Björn Svensson
c105117b40
Use PCRE2 instead of PCRE ( #153 )
...
PCRE is now at end of life and is no longer actively maintained.
Lift the dependency to the next major version, i.e. PCRE2.
Implementation notes:
- Removed the pcre study option since:
"The new API ... was simplified by abolishing the separate "study" optimizing
function; in PCRE2, patterns are automatically optimized where possible."
- If asprintf() fails the content of the 'strp' variable is undefined.
Lets check the return value and return NULL upon error.
- Pattern and subject can straightforwardly be cast to PCRE2_SPTR since we
only work with 8-bit code units.
2023-10-23 12:38:24 +02:00
Björn Svensson
9168f7e4d4
Support C23 projects
...
Don't define true/false/bool when r3 is used by C23 projects
since C23 already has a bool type and predefined constants.
2023-10-23 10:45:18 +02:00
Björn Svensson
bf11f8e2e6
Remove unused code in memory.c/.h
2021-11-03 21:58:33 +01:00
Björn Svensson
f0dd25bd53
Remove unused memory pool
2021-11-03 21:22:48 +01:00
Björn Svensson
5114d894e5
Remove fixed alignment
2021-10-18 11:36:54 +02:00
Yo-An Lin
b13dc8aa6e
Merge pull request #131 from iresty/feature-ipv6
...
feature: supported to use ipv6 address match route.
2021-10-14 10:31:23 +08:00
Björn Svensson
383717a8c7
Update the faulty access macros for str_array
...
Adds a testcase for the usage of the access macros, and also
updates the testsuite to only include what str_array requires.
This shows that str_array can be used separately by users.
2021-10-13 08:47:20 +02:00
Björn Svensson
673bb2f6d9
Remove declarations for nonexisting functions in str_array.h
2021-10-13 08:47:20 +02:00
Björn Svensson
4babe735e8
Remove cyclic dependency between str_array.h and r3.h
...
This also makes sure we dont get warnings regarding bool
redefinitions when building with clang.
2021-10-13 08:46:47 +02:00
Yuansheng
79fd587615
feature: supported to match ipv6 address.
2019-08-01 21:38:14 -04:00
Yo-An Lin
577cfa0ccb
Merge pull request #130 from iresty/typo
...
change: typo.
2019-07-21 19:30:50 +08:00
Yuansheng
f8a3741211
change: typo.
2019-07-21 09:14:37 +08:00
Yuansheng
db91289ab6
change: rename OP_EXPECT_NOLINEBREAKS
to OP_GREEDY_ANY
.
2019-07-20 10:52:56 -04:00
Yuansheng
d516237aab
optimize: optimized pattern .*
, which can be used prefix matching.
2019-07-20 10:52:56 -04:00
Yuansheng
43666a1183
feature: supported to match http scheme.
2019-06-26 23:06:32 +08:00
Yuansheng
848b8efdca
feature: supported to match remote ip address.
2019-06-19 23:36:37 -04:00
Sakamoto
69e31ce07a
Quick Includes Bug fix
2019-01-23 01:02:04 +08:00
Martijn Otto
1eeff1598a
Fix declaration of memset
2018-02-21 10:04:07 +01:00
Martijn Otto
021c54308a
Fix const correctness warnings
2018-02-20 18:18:43 +01:00
karantin2020
ffc9e8571b
Added memory files
2016-03-26 21:34:07 +05:00
karantin2020
75438ef3d3
Changed r3 memory model, made few optimizing
2016-03-22 07:23:37 +05:00
karantin2020
400768394d
Added slug parser and repaired few memory leaks
2016-03-08 11:19:54 +05:00
c9s
03031e02aa
Fix r3 json writer
2015-11-18 14:27:28 +08:00
c9s
c3ef959539
Add route namespace
...
Summary:
type route now becomes R3Route
Related issue #63
2015-11-18 14:16:26 +08:00
c9s
49ffb454f7
Add namespace for node/edge structs
...
node => R3Node
edge => R3Edge
Related issue #63
2015-11-18 12:53:46 +08:00
c9s
1f1ab15cdd
Fix for stdbool type
2015-11-17 21:40:21 +08:00
c9s
c128cdef13
Provide better feature checking for stdbool
2015-11-17 21:31:33 +08:00
c9s
3808cb37aa
Move debug macros to private header files
2015-11-17 21:24:36 +08:00
c9s
973a2cb85c
Move private functions to private header files
2015-11-17 21:17:35 +08:00
c9s
e5ef80a200
Move private function to src/str.h
2015-11-17 21:13:38 +08:00
c9s
63577cfecc
Remove unused str_repeat function
2015-11-17 21:06:59 +08:00
c9s
122d85d9e1
Remove unused str* function decl
2015-11-17 18:33:33 +08:00
c9s
dbc18a86c4
__attribute__
2015-11-17 18:32:51 +08:00
c9s
af8acd0286
use __attribute aligned to align struct
2015-11-17 18:32:51 +08:00
c9s
84a7d83812
Add padding to node struct
2015-11-17 18:32:51 +08:00
c9s
b52af2acbd
Add padding to edge structure
2015-11-17 18:32:51 +08:00
c9s
150f7953a2
Remove unneccessary comments from struct
2015-11-17 18:32:50 +08:00
c9s
d4850d3564
Make edges as an array
...
Fixes : #89
2015-11-17 18:32:50 +08:00
c9s
28726b27af
Fix r3_str.h header protection
2015-11-17 18:27:25 +08:00
c9s
34269aa045
Change compare_type from char to int
2015-11-10 19:36:01 +08:00
c9s
659dc19b1b
Replace short integer with int to fit into cacheline (assume 64byte)
2015-11-10 19:29:18 +08:00
c9s
5d35d34ab3
Put pcre_extra back
2015-11-10 19:21:53 +08:00
c9s
5002272a33
Move pointer fields to top of the structure
2015-11-10 18:43:25 +08:00
Steve Jones
d12296af59
Don't typedef bool if compiling with C++
...
If using the C++ wrapper provided by r3.hpp, you get a compiler
error when r3_define.h tries to typedef bool as C++ already has
native bool type. Modified the guard around this typedef
to include a check for C++ compilation (!defined(__cplusplus)).
2015-09-28 11:42:45 -05:00
Ricky Su
d5296df683
add extern c in c++
2015-08-27 13:58:36 +08:00
Ricky Su
f445c261c6
add r3_slug_find_name and rename slug_count to r3_slug_count
2015-08-26 22:00:23 +08:00
ChangZhuo Chen (陳昌倬)
6eb509beb2
Use ##__VA_ARGS__ to avoid build fail
2014-07-04 18:26:32 +08:00
c9s
da026219be
Fix gvc graph generator function
2014-06-28 00:53:04 +08:00
c9s
72f10015d5
Fix copyright email
2014-06-27 13:24:40 +08:00
c9s
9a9572a0d5
Fix duplicated symbol define
2014-06-27 00:05:24 +08:00