Skip to content

Commit 29b26fd

Browse files
composerinteralianobu
authored andcommitted
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.)
1 parent 543dd77 commit 29b26fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
15381538
#else
15391539
# define INC_NUM_FAILS ((void) 0)
15401540
# define MEMOIZE_MATCH_CACHE_POINT ((void) 0)
1541-
# define MEMOIZE_LOOKAROUND_MATCH_CACHE_POINT ((void) 0)
1541+
# define MEMOIZE_LOOKAROUND_MATCH_CACHE_POINT(stkp) ((void) 0)
15421542
#endif
15431543

15441544
#define STACK_POP_ONE do {\

0 commit comments

Comments
 (0)