diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:18:21 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:18:21 -0500 |
| commit | 1e3fb8a2c0cca385d65c52679411b118b5fb4641 (patch) | |
| tree | e8e7ae5b4a8b4f39ed867c238f1a05494b6a50ac /stdlib/patterns.c | |
| parent | 0e10313d64f54dd587ebbcd5f413bd999333c911 (diff) | |
Rename "NULL" to "NONE"
Diffstat (limited to 'stdlib/patterns.c')
| -rw-r--r-- | stdlib/patterns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/patterns.c b/stdlib/patterns.c index 97cade4a..3bf2ebfd 100644 --- a/stdlib/patterns.c +++ b/stdlib/patterns.c @@ -802,13 +802,13 @@ public OptionalMatch_t Text$find(Text_t text, Pattern_t pattern, Int_t from_inde if (first == 0) fail("Invalid index: 0"); if (first < 0) first = text.length + first + 1; if (first > text.length || first < 1) - return NULL_MATCH; + return NONE_MATCH; capture_t captures[MAX_BACKREFS] = {}; int64_t len = 0; int64_t found = _find(text, pattern, first-1, text.length-1, &len, captures); if (found == -1) - return NULL_MATCH; + return NONE_MATCH; Array_t capture_array = {}; for (int i = 0; captures[i].occupied; i++) { @@ -845,7 +845,7 @@ public OptionalArray_t Text$matches(Text_t text, Pattern_t pattern) capture_t captures[MAX_BACKREFS] = {}; int64_t match_len = match(text, 0, pattern, 0, captures, 0); if (match_len != text.length) - return NULL_ARRAY; + return NONE_ARRAY; Array_t capture_array = {}; for (int i = 0; captures[i].occupied; i++) { |
