Formatting optimization of C code in the README file.
This commit is contained in:
parent
32f30db44d
commit
c150d27d4b
1 changed files with 5 additions and 5 deletions
10
README.md
10
README.md
|
@ -38,14 +38,14 @@ n = r3_tree_create(10);
|
||||||
int route_data = 3;
|
int route_data = 3;
|
||||||
|
|
||||||
// insert the route path into the router tree
|
// insert the route path into the router tree
|
||||||
r3_tree_insert_path(n, "/bar", &route_data ); // ignore the length of path
|
r3_tree_insert_path(n, "/bar", &route_data); // ignore the length of path
|
||||||
|
|
||||||
r3_tree_insert_pathl(n, "/zoo" , strlen("/zoo") , &route_data );
|
r3_tree_insert_pathl(n, "/zoo", strlen("/zoo"), &route_data );
|
||||||
r3_tree_insert_pathl(n, "/foo/bar" , strlen("/foo/bar") , &route_data );
|
r3_tree_insert_pathl(n, "/foo/bar", strlen("/foo/bar"), &route_data );
|
||||||
|
|
||||||
r3_tree_insert_pathl(n , "/post/{id}" , strlen("/post/{id}") , &route_data );
|
r3_tree_insert_pathl(n ,"/post/{id}", strlen("/post/{id}") , &route_data );
|
||||||
|
|
||||||
r3_tree_insert_pathl(n , "/user/{id:\\d+}" , strlen("/user/{id:\\d+}") , NULL, &route_data );
|
r3_tree_insert_pathl(n, "/user/{id:\\d+}", strlen("/user/{id:\\d+}"), &route_data );
|
||||||
|
|
||||||
// let's compile the tree!
|
// let's compile the tree!
|
||||||
r3_tree_compile(n);
|
r3_tree_compile(n);
|
||||||
|
|
Loading…
Reference in a new issue