Skip to content

Commit

Permalink
Refactoring the include guards
Browse files Browse the repository at this point in the history
  • Loading branch information
Silviu Caragea committed Sep 28, 2016
1 parent 319824a commit ee5824a
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions c_src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef constants_h
#define constants_h
#ifndef ERLCASS_C_SRC_CONSTANTS_H
#define ERLCASS_C_SRC_CONSTANTS_H

namespace erlcass {

Expand Down
6 changes: 3 additions & 3 deletions c_src/data_conversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
//
//

#ifndef __erlcass__data_conversion__
#define __erlcass__data_conversion__
#ifndef ERLCASS_C_SRC_DATA_CONVERSION_H
#define ERLCASS_C_SRC_DATA_CONVERSION_H

#include "erl_nif.h"

typedef struct CassResult_ CassResult;

ERL_NIF_TERM cass_result_to_erlang_term(ErlNifEnv* env, const CassResult* result);

#endif /* defined(__erlcass__data_conversion__) */
#endif
4 changes: 2 additions & 2 deletions c_src/erlcass.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef erlcass_erlcass_h
#define erlcass_erlcass_h
#ifndef ERLCASS_C_SRC_ERLCASS_H
#define ERLCASS_C_SRC_ERLCASS_H

#include "erl_nif.h"
#include "cassandra.h"
Expand Down
6 changes: 3 additions & 3 deletions c_src/metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__metadata__
#define __erlcass__metadata__
#ifndef ERLCASS_C_SRC_METADATA_H
#define ERLCASS_C_SRC_METADATA_H

#include "erl_nif.h"
#include "cassandra.h"
Expand All @@ -28,4 +28,4 @@ struct SchemaColumn

SchemaColumn atom_to_schema_column(ErlNifEnv* env, ERL_NIF_TERM value);

#endif /* defined(__erlcass__metadata__) */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_cass_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__nif_cass_cluster__
#define __erlcass__nif_cass_cluster__
#ifndef ERLCASS_C_SRC_NIF_CASS_CLUSTER_H
#define ERLCASS_C_SRC_NIF_CASS_CLUSTER_H

#include "erl_nif.h"

Expand All @@ -17,4 +17,4 @@ ERL_NIF_TERM nif_cass_cluster_release(ErlNifEnv* env, int argc, const ERL_NIF_TE
ERL_NIF_TERM nif_cass_log_set_level_and_callback(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM nif_cass_cluster_set_options(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);

#endif /* defined(__erlcass__nif_cass_cluster__) */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_cass_prepared.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__nif_cass_prepared__
#define __erlcass__nif_cass_prepared__
#ifndef ERLCASS_C_SRC_NIF_CASS_PREPARED_H
#define ERLCASS_C_SRC_NIF_CASS_PREPARED_H

#include "erl_nif.h"
#include "cassandra.h"
Expand All @@ -16,4 +16,4 @@ ERL_NIF_TERM nif_cass_prepared_new(ErlNifEnv* env, ErlNifResourceType* rs, const
ERL_NIF_TERM nif_cass_prepared_bind(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
void nif_cass_prepared_free(ErlNifEnv* env, void* obj);

#endif /* defined(__erlcass__nif_cass_prepared__) */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_cass_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__nif_cass_session__
#define __erlcass__nif_cass_session__
#ifndef ERLCASS_C_SRC_NIF_CASS_SESSION_H
#define ERLCASS_C_SRC_NIF_CASS_SESSION_H

#include "erl_nif.h"

Expand All @@ -20,4 +20,4 @@ ERL_NIF_TERM nif_cass_session_execute(ErlNifEnv* env, int argc, const ERL_NIF_TE
ERL_NIF_TERM nif_cass_session_execute_batch(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM nif_cass_session_get_metrics(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);

#endif /* defined(__erlcass__nif_cass_session__) */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_cass_statement.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__nif_cass_statement__
#define __erlcass__nif_cass_statement__
#ifndef ERLCASS_C_SRC_NIF_CASS_STATEMENT_H
#define ERLCASS_C_SRC_NIF_CASS_STATEMENT_H

#include "erlcass.h"

Expand All @@ -17,4 +17,4 @@ ERL_NIF_TERM nif_cass_statement_new(ErlNifEnv* env, ErlNifResourceType* resource
ERL_NIF_TERM nif_cass_statement_bind_parameters(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
void nif_cass_statement_free(ErlNifEnv* env, void* obj);

#endif /* defined(__erlcass__nif_cass_statement__) */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_cass_uuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__nif_cass_uuid__
#define __erlcass__nif_cass_uuid__
#ifndef ERLCASS_C_SRC_NIF_CASS_UUID_H
#define ERLCASS_C_SRC_NIF_CASS_UUID_H

#include "erl_nif.h"

Expand All @@ -19,4 +19,4 @@ ERL_NIF_TERM nif_cass_uuid_max_from_time(ErlNifEnv* env, int argc, const ERL_NIF
ERL_NIF_TERM nif_cass_uuid_timestamp(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM nif_cass_uuid_version(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);

#endif /* defined(__erlcass__nif_cass_uuid__) */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_collection.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
//
//

#ifndef __erlcass__collection__
#define __erlcass__collection__
#ifndef ERLCASS_C_SRC_NIF_COLLECTION_H
#define ERLCASS_C_SRC_NIF_COLLECTION_H

#include "erl_nif.h"
#include "metadata.h"

ERL_NIF_TERM nif_list_to_cass_collection(ErlNifEnv* env, ERL_NIF_TERM list, const SchemaColumn& type, CassCollection ** col);

#endif /* defined(__erlcass__collection__) */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_date_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
//
//

#ifndef nif_date_time_h
#define nif_date_time_h
#ifndef ERLCASS_C_SRC_NIF_DATE_TIME_H
#define ERLCASS_C_SRC_NIF_DATE_TIME_H

#include "erl_nif.h"

ERL_NIF_TERM nif_cass_date_from_epoch(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM nif_cass_time_from_epoch(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM nif_cass_date_time_to_epoch(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);

#endif /* nif_date_time_h */
#endif
6 changes: 3 additions & 3 deletions c_src/nif_tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
//
//

#ifndef nif_tuple_hpp
#define nif_tuple_hpp
#ifndef ERLCASS_C_SRC_NIF_TUPLE_H
#define ERLCASS_C_SRC_NIF_TUPLE_H

#include "erl_nif.h"
#include "metadata.h"

ERL_NIF_TERM nif_term_to_cass_tuple(ErlNifEnv* env, ERL_NIF_TERM term, const SchemaColumn & type, CassTuple** tuple);

#endif /* nif_tuple_hpp */
#endif
4 changes: 2 additions & 2 deletions c_src/nif_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__utils__
#define __erlcass__utils__
#ifndef ERLCASS_C_SRC_NIF_UTILS_H
#define ERLCASS_C_SRC_NIF_UTILS_H

#include "erl_nif.h"
#include "cassandra.h"
Expand Down
6 changes: 3 additions & 3 deletions c_src/uuid_serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//

#ifndef __erlcass__uuid_serialization__
#define __erlcass__uuid_serialization__
#ifndef ERLCASS_C_SRC_UUID_SERIALIZATION_H
#define ERLCASS_C_SRC_UUID_SERIALIZATION_H

#include "cassandra.h"

Expand All @@ -18,4 +18,4 @@ CassError cass_uuid_from_string_n(const char* str, size_t str_length, CassUuid*

}

#endif /* defined(__erlcass__uuid_serialization__) */
#endif

0 comments on commit ee5824a

Please sign in to comment.