Merge pull request #44 from whitglint/master

Add extern "C".
This commit is contained in:
Pedro 2014-06-01 17:00:07 +08:00
commit 93c3d0769b
2 changed files with 16 additions and 3 deletions

View file

@ -11,6 +11,10 @@
#include "r3_define.h" #include "r3_define.h"
#include "str_array.h" #include "str_array.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct { typedef struct {
str_array * vars; str_array * vars;
const char * path; // current path to dispatch const char * path; // current path to dispatch
@ -32,4 +36,8 @@ match_entry * match_entry_createl(const char * path, int path_len);
void match_entry_free(match_entry * entry); void match_entry_free(match_entry * entry);
#ifdef __cplusplus
}
#endif
#endif /* !MATCH_ENTRY_H */ #endif /* !MATCH_ENTRY_H */

View file

@ -16,6 +16,10 @@
#include "str_array.h" #include "str_array.h"
#include "match_entry.h" #include "match_entry.h"
#ifdef __cplusplus
extern "C" {
#endif
struct _edge; struct _edge;
struct _node; struct _node;
struct _route; struct _route;
@ -170,7 +174,8 @@ enum { NODE_COMPARE_STR, NODE_COMPARE_PCRE, NODE_COMPARE_OPCODE };
enum { OP_EXPECT_MORE_DIGITS = 1, OP_EXPECT_MORE_WORDS, OP_EXPECT_NOSLASH, OP_EXPECT_NODASH, OP_EXPECT_MORE_ALPHA }; enum { OP_EXPECT_MORE_DIGITS = 1, OP_EXPECT_MORE_WORDS, OP_EXPECT_NOSLASH, OP_EXPECT_NODASH, OP_EXPECT_MORE_ALPHA };
#ifdef __cplusplus
}
#endif
#endif /* !R3_NODE_H */ #endif /* !R3_NODE_H */