diff --git a/include/match_entry.h b/include/match_entry.h index 9956dbd..bda1dd3 100644 --- a/include/match_entry.h +++ b/include/match_entry.h @@ -11,6 +11,10 @@ #include "r3_define.h" #include "str_array.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { str_array * vars; const char * path; // current path to dispatch @@ -19,7 +23,7 @@ typedef struct { void * data; // route ptr - char * host; // the request host + char * host; // the request host int host_len; char * remote_addr; @@ -32,4 +36,8 @@ match_entry * match_entry_createl(const char * path, int path_len); void match_entry_free(match_entry * entry); +#ifdef __cplusplus +} +#endif + #endif /* !MATCH_ENTRY_H */ diff --git a/include/r3.h b/include/r3.h index d7632d3..d7326a2 100644 --- a/include/r3.h +++ b/include/r3.h @@ -22,6 +22,10 @@ #endif +#ifdef __cplusplus +extern "C" { +#endif + struct _edge; struct _node; struct _route; @@ -184,6 +188,9 @@ json_object * r3_route_to_json_object(const route * r); const char * r3_node_to_json_string_ext(const node * n, int options); const char * r3_node_to_json_pretty_string(const node * n); const char * r3_node_to_json_string(const node * n); + +#ifdef __cplusplus +} #endif #endif /* !R3_NODE_H */