more const pointers
This commit is contained in:
parent
072c72621c
commit
d400789d96
3 changed files with 4 additions and 4 deletions
|
@ -148,7 +148,7 @@ route * r3_route_create(const char * path);
|
||||||
|
|
||||||
route * r3_route_createl(const char * path, int path_len);
|
route * r3_route_createl(const char * path, int path_len);
|
||||||
|
|
||||||
int r3_route_cmp(route *r1, const match_entry *r2);
|
int r3_route_cmp(const route *r1, const match_entry *r2);
|
||||||
|
|
||||||
void r3_node_append_route(node * n, route * route);
|
void r3_node_append_route(node * n, route * route);
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ route * r3_tree_match_route(const node *n, const match_entry * entry);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int r3_pattern_to_opcode(char * pattern, int pattern_len);
|
int r3_pattern_to_opcode(const char * pattern, int pattern_len);
|
||||||
|
|
||||||
enum { NODE_COMPARE_STR, NODE_COMPARE_PCRE, NODE_COMPARE_OPCODE };
|
enum { NODE_COMPARE_STR, NODE_COMPARE_PCRE, NODE_COMPARE_OPCODE };
|
||||||
|
|
||||||
|
|
|
@ -640,7 +640,7 @@ void r3_tree_dump(const node * n, int level) {
|
||||||
*
|
*
|
||||||
* -1 == different route
|
* -1 == different route
|
||||||
*/
|
*/
|
||||||
int r3_route_cmp(route *r1, const match_entry *r2) {
|
int r3_route_cmp(const route *r1, const match_entry *r2) {
|
||||||
if (r1->request_method != 0) {
|
if (r1->request_method != 0) {
|
||||||
if (0 == (r1->request_method & r2->request_method) ) {
|
if (0 == (r1->request_method & r2->request_method) ) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "r3_str.h"
|
#include "r3_str.h"
|
||||||
#include "zmalloc.h"
|
#include "zmalloc.h"
|
||||||
|
|
||||||
int r3_pattern_to_opcode(char * pattern, int len) {
|
int r3_pattern_to_opcode(const char * pattern, int len) {
|
||||||
if ( strncmp(pattern, "\\w+",len) == 0 ) {
|
if ( strncmp(pattern, "\\w+",len) == 0 ) {
|
||||||
return OP_EXPECT_MORE_WORDS;
|
return OP_EXPECT_MORE_WORDS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue