Rename route_info to route

This commit is contained in:
c9s 2014-05-18 11:05:01 +08:00
parent eb3ef7df0f
commit 5ca345d570
4 changed files with 9 additions and 8 deletions

View file

@ -81,7 +81,7 @@ typedef struct {
char * remote_addr_pattern;
int remote_addr_pattern_len;
} route_info;
} route;
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);
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 */

View file

@ -194,12 +194,12 @@ void r3_tree_compile_patterns(node * n) {
}
}
route_info * route_info_create(char * path) {
return route_info_createl(path, strlen(path));
route * route_create(char * path) {
return route_createl(path, strlen(path));
}
route_info * route_info_createl(char * path, int path_len) {
route_info * info = malloc(sizeof(route_info));
route * route_createl(char * path, int path_len) {
route * info = malloc(sizeof(route));
info->path = path;
info->path_len = path_len;
info->request_method = 0; // can be (GET || POST)

View file

@ -87,3 +87,4 @@
1400373185,13716181.30
1400374415,13164892.40
1400382244,12226293.04
1400382299,11775631.24

1 1400242718 5649455.80
87 1400373185 13716181.30
88 1400374415 13164892.40
89 1400382244 12226293.04
90 1400382299 11775631.24

View file

@ -267,7 +267,7 @@ START_TEST(test_insert_route)
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);