by Yo-An Lin yoanlin93@gmail.com
HAVE_STRNDUP
and HAVE_STRDUP
definition fixAPI changes:
Removed the route
argument from r3_tree_insert_pathl_ex
:
node * r3_tree_insert_pathl_ex(node *tree, char *path, int path_len, void * data);
This reduce the interface complexity, e.g.,
r3_tree_insert_path(n, "/user2/{id:\\d+}", &var2);
The original r3_tree_insert_pathl_ex
has been moved to r3_tree_insert_pathl_ex
as a private API.
Moved r3_tree_matchl
to r3_tree_matchl
since it require the length of the path string.
m = r3_tree_matchl( n , "/foo", strlen("/foo"), entry);
Added r3_tree_match
for users to match a path without the length of the path string.
m = r3_tree_match( n , "/foo", entry);
Added r3_tree_match_entry
for users want to match a match_entry
, which is just a macro to simplify the use:
#define r3_tree_match_entry(n, entry) r3_tree_matchl(n, entry->path, entry->path_len, entry)
Please note that A path that is inserted by r3_tree_insert_route
can only be matched by r3_tree_match_route
.
Added r3_
prefix to route
related methods.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )