summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorDaniel Colson <[email protected]>2025-04-12 14:04:57 -0400
committerNobuyoshi Nakada <[email protected]>2025-04-13 11:44:49 +0900
commit29b26fd3e7a881399b69665184be41ee6d47da6f (patch)
tree6c7d207187fa830c714985d2cbdf8afe0ec839e7 /regexec.c
parent543dd77cc39d16a45693d35af670995f7e66ce36 (diff)
Fix macro for disabled match cache
The `MEMOIZE_LOOKAROUND_MATCH_CACHE_POINT` macro needs an argument otherwise we end up with: ``` ../regexec.c:3955:2: error: called object type 'void' is not a function or function pointer 3955 | STACK_POS_END(stkp); | ^~~~~~~~~~~~~~~~~~~ ../regexec.c:1680:41: note: expanded from macro 'STACK_POS_END' 1680 | MEMOIZE_LOOKAROUND_MATCH_CACHE_POINT(k);\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ../regexec.c:3969:7: error: called object type 'void' is not a function or function pointer 3969 | STACK_POP_TIL_POS_NOT; | ^~~~~~~~~~~~~~~~~~~~~ ../regexec.c:1616:41: note: expanded from macro 'STACK_POP_TIL_POS_NOT' 1616 | MEMOIZE_LOOKAROUND_MATCH_CACHE_POINT(stk);\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ``` The macro definition with the match cache enabled already has the correct argument. This one is for when the match cache is disabled (I had disabled it while trying to learn more about how it works.)
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13105
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 8245678355..c6bbd0efd8 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1538,7 +1538,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
#else
# define INC_NUM_FAILS ((void) 0)
# define MEMOIZE_MATCH_CACHE_POINT ((void) 0)
-# define MEMOIZE_LOOKAROUND_MATCH_CACHE_POINT ((void) 0)
+# define MEMOIZE_LOOKAROUND_MATCH_CACHE_POINT(stkp) ((void) 0)
#endif
#define STACK_POP_ONE do {\