c9s / r3

libr3 is a high-performance path dispatching library. It compiles your route paths into a prefix tree (trie). By using the constructed prefix trie in the start-up time, you may dispatch your routes with efficiency
http://c9s.github.com/r3/bench.html
MIT License
814 stars 83 forks source link

error code support #42

Closed c9s closed 10 years ago

c9s commented 10 years ago

let r3_tree_compile_patterns return errno if error occurs, for example:

result_t r3_tree_compile_patterns(node * n)
c9s commented 10 years ago

Improved in 1a4eb14a05501eca4f5ab31528737e766fe3c49f. cc @CindyLinz

c9s commented 10 years ago

Usage Sample:

    char *errstr = NULL;
    int errno;
    errno = r3_tree_compile(n, &errstr);
    assert(errno == 0); // no error