Merge branch 'master' of github.com:c9s/r3

Conflicts:
	include/r3.h
This commit is contained in:
c9s 2014-06-01 20:20:51 +08:00
commit 8d2a473f54
2 changed files with 16 additions and 1 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
@ -19,7 +23,7 @@ typedef struct {
void * data; // route ptr void * data; // route ptr
char * host; // the request host char * host; // the request host
int host_len; int host_len;
char * remote_addr; 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); void match_entry_free(match_entry * entry);
#ifdef __cplusplus
}
#endif
#endif /* !MATCH_ENTRY_H */ #endif /* !MATCH_ENTRY_H */

View file

@ -22,6 +22,10 @@
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
struct _edge; struct _edge;
struct _node; struct _node;
struct _route; 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_string_ext(const node * n, int options);
const char * r3_node_to_json_pretty_string(const node * n); const char * r3_node_to_json_pretty_string(const node * n);
const char * r3_node_to_json_string(const node * n); const char * r3_node_to_json_string(const node * n);
#ifdef __cplusplus
}
#endif #endif
#endif /* !R3_NODE_H */ #endif /* !R3_NODE_H */