update README
This commit is contained in:
parent
8bb68ab31d
commit
09da7a0b6c
1 changed files with 18 additions and 1 deletions
19
README.md
19
README.md
|
@ -92,7 +92,11 @@ if (matched_node) {
|
|||
r3_tree_free(n);
|
||||
```
|
||||
|
||||
If you want to capture the variables from regular expression, you will need to create a match entry,
|
||||
|
||||
**Capture Dynamic Variables**
|
||||
|
||||
If you want to capture the variables from regular expression, you will need to
|
||||
create a `match_entry` object and pass the object to `r3_tree_matchl` function,
|
||||
the catched variables will be pushed into the match entry structure:
|
||||
|
||||
```c
|
||||
|
@ -116,6 +120,19 @@ When using `match_entry`, you may match the route with `r3_tree_match_entry` fun
|
|||
node *matched_node = r3_tree_match_entry(n, entry);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
**Release Memroy**
|
||||
|
||||
To release the memory, you may call `r3_tree_free(node *tree)` to release the whole tree structure,
|
||||
`node*`, `edge*`, `route*` objects that were inserted into the tree will be freed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Routing with conditions
|
||||
|
||||
```c
|
||||
|
|
Loading…
Reference in a new issue