Skip to content

Commit f54bd24

Browse files
committed
Update rure_set documentation for new fields
1 parent d464edf commit f54bd24

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

regex-capi/include/rure.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,13 @@ void rure_options_dfa_size_limit(rure_options *options, size_t limit);
462462
* The number of patterns to compile is specified by patterns_count. patterns
463463
* must contain at least this many entries.
464464
*
465+
* flags is a bitfield. Valid values are constants declared with prefix
466+
* RURE_FLAG_.
467+
*
468+
* options contains non-flag configuration settings. If it's NULL, default
469+
* settings are used. options may be freed immediately after a call to
470+
* rure_compile.
471+
*
465472
* error is set if there was a problem compiling the pattern.
466473
*
467474
* The compiled expression set returned may be used from multiple threads.
@@ -488,6 +495,12 @@ void rure_set_free(rure_set *re);
488495
* haystack may contain arbitrary bytes, but ASCII compatible text is more
489496
* useful. UTF-8 is even more useful. Other text encodings aren't supported.
490497
* length should be the number of bytes in haystack.
498+
*
499+
* start is the position at which to start searching. Note that setting the
500+
* start position is distinct from incrementing the pointer, since the regex
501+
* engine may look at bytes before the start position to determine match
502+
* information. For example, if the start position is greater than 0, then the
503+
* \A ("begin text") anchor can never match.
491504
*/
492505
bool rure_set_is_match(rure_set *re, const uint8_t *haystack, size_t length,
493506
size_t start);
@@ -503,6 +516,12 @@ bool rure_set_is_match(rure_set *re, const uint8_t *haystack, size_t length,
503516
* useful. UTF-8 is even more useful. Other text encodings aren't supported.
504517
* length should be the number of bytes in haystack.
505518
*
519+
* start is the position at which to start searching. Note that setting the
520+
* start position is distinct from incrementing the pointer, since the regex
521+
* engine may look at bytes before the start position to determine match
522+
* information. For example, if the start position is greater than 0, then the
523+
* \A ("begin text") anchor can never match.
524+
*
506525
* matches must be greater than or equal to the number of patterns the
507526
* rure_set was compiled with.
508527
*

0 commit comments

Comments
 (0)