Rename route_info to route
This commit is contained in:
parent
eb3ef7df0f
commit
5ca345d570
4 changed files with 9 additions and 8 deletions
|
@ -81,7 +81,7 @@ typedef struct {
|
||||||
char * remote_addr_pattern;
|
char * remote_addr_pattern;
|
||||||
int remote_addr_pattern_len;
|
int remote_addr_pattern_len;
|
||||||
|
|
||||||
} route_info;
|
} route;
|
||||||
|
|
||||||
|
|
||||||
node * r3_tree_create(int cap);
|
node * r3_tree_create(int cap);
|
||||||
|
@ -136,8 +136,8 @@ match_entry * match_entry_createl(char * path, int path_len);
|
||||||
void match_entry_free(match_entry * entry);
|
void match_entry_free(match_entry * entry);
|
||||||
|
|
||||||
|
|
||||||
route_info * route_info_create(char * path);
|
route * route_create(char * path);
|
||||||
|
|
||||||
route_info * route_info_createl(char * path, int path_len);
|
route * route_createl(char * path, int path_len);
|
||||||
|
|
||||||
#endif /* !NODE_H */
|
#endif /* !NODE_H */
|
||||||
|
|
|
@ -194,12 +194,12 @@ void r3_tree_compile_patterns(node * n) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
route_info * route_info_create(char * path) {
|
route * route_create(char * path) {
|
||||||
return route_info_createl(path, strlen(path));
|
return route_createl(path, strlen(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
route_info * route_info_createl(char * path, int path_len) {
|
route * route_createl(char * path, int path_len) {
|
||||||
route_info * info = malloc(sizeof(route_info));
|
route * info = malloc(sizeof(route));
|
||||||
info->path = path;
|
info->path = path;
|
||||||
info->path_len = path_len;
|
info->path_len = path_len;
|
||||||
info->request_method = 0; // can be (GET || POST)
|
info->request_method = 0; // can be (GET || POST)
|
||||||
|
|
|
@ -87,3 +87,4 @@
|
||||||
1400373185,13716181.30
|
1400373185,13716181.30
|
||||||
1400374415,13164892.40
|
1400374415,13164892.40
|
||||||
1400382244,12226293.04
|
1400382244,12226293.04
|
||||||
|
1400382299,11775631.24
|
||||||
|
|
|
|
@ -267,7 +267,7 @@ START_TEST(test_insert_route)
|
||||||
|
|
||||||
node * tree = r3_tree_create(2);
|
node * tree = r3_tree_create(2);
|
||||||
|
|
||||||
// route_info *info = route_info_create("/blog/post", strlen("/blog/post") );
|
// route *info = route_create("/blog/post", strlen("/blog/post") );
|
||||||
|
|
||||||
// r3_tree_insert_route(n, "/foo/bar/baz", NULL);
|
// r3_tree_insert_route(n, "/foo/bar/baz", NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue