const to node * n
This commit is contained in:
parent
0d2ae75bc2
commit
0064eb27a1
3 changed files with 10 additions and 6 deletions
|
@ -124,14 +124,14 @@ int r3_tree_render_file(node * tree, char * format, char * filename);
|
|||
|
||||
int r3_tree_render_dot(node * tree);
|
||||
|
||||
edge * r3_node_find_edge_str(node * n, char * str, int str_len);
|
||||
edge * r3_node_find_edge_str(const node * n, char * str, int str_len);
|
||||
|
||||
|
||||
void r3_tree_compile(node *n);
|
||||
|
||||
void r3_tree_compile_patterns(node * n);
|
||||
|
||||
node * r3_tree_matchl(node * n, char * path, int path_len, match_entry * entry);
|
||||
node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * entry);
|
||||
|
||||
#define r3_tree_match(n,p,e) r3_tree_matchl(n,p, strlen(p), e)
|
||||
|
||||
|
@ -165,7 +165,7 @@ void r3_node_append_route(node * n, route * route);
|
|||
|
||||
void r3_route_free(route * route);
|
||||
|
||||
route * r3_tree_match_route(node *n, match_entry * entry);
|
||||
route * r3_tree_match_route(const node *n, match_entry * entry);
|
||||
|
||||
#define METHOD_GET 2
|
||||
#define METHOD_POST 2<<1
|
||||
|
|
|
@ -252,7 +252,7 @@ void match_entry_free(match_entry * entry) {
|
|||
* @param int path_len the length of the URL path.
|
||||
* @param match_entry* entry match_entry is used for saving the captured dynamic strings from pcre result.
|
||||
*/
|
||||
node * r3_tree_matchl(node * n, char * path, int path_len, match_entry * entry) {
|
||||
node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * entry) {
|
||||
info("try matching: %s\n", path);
|
||||
|
||||
edge *e;
|
||||
|
@ -328,7 +328,7 @@ node * r3_tree_matchl(node * n, char * path, int path_len, match_entry * entry)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
route * r3_tree_match_route(node *tree, match_entry * entry) {
|
||||
route * r3_tree_match_route(const node *tree, match_entry * entry) {
|
||||
node *n;
|
||||
n = r3_tree_match_entry(tree, entry);
|
||||
if (n->routes && n->route_len > 0) {
|
||||
|
@ -342,7 +342,7 @@ route * r3_tree_match_route(node *tree, match_entry * entry) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
inline edge * r3_node_find_edge_str(node * n, char * str, int str_len) {
|
||||
inline edge * r3_node_find_edge_str(const node * n, char * str, int str_len) {
|
||||
int i = 0;
|
||||
int matched_idx = 0;
|
||||
char firstbyte = *str;
|
||||
|
|
|
@ -428,3 +428,7 @@
|
|||
1400606406,13923000.83
|
||||
1400606409,13742645.62
|
||||
1400606411,13878225.03
|
||||
1400606451,13922301.44
|
||||
1400606491,14030387.83
|
||||
1400606523,13157029.51
|
||||
1400606567,13999364.95
|
||||
|
|
|
Loading…
Reference in a new issue