Skip to content

Commit

Permalink
regex engine - wrap PL_regnode_arg_len_varies with macro REGNODE_ARG_…
Browse files Browse the repository at this point in the history
…LEN_VARIES()
  • Loading branch information
demerphq committed Aug 6, 2022
1 parent e28d2a3 commit 79a585d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions regcomp.h
Expand Up @@ -1412,6 +1412,7 @@ typedef enum {
#define REGNODE_TYPE(arg) PL_regnode_kind[(arg)]
#define REGNODE_OFF_BY_ARG(node) PL_regnode_of_by_arg[(node)]
#define REGNODE_ARG_LEN(node) PL_regnode_arg_len[(node)]
#define REGNODE_ARG_LEN_VARIES(node) PL_regnode_arg_len_varies[(node)]

#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
#include "reginline.h"
Expand Down
2 changes: 1 addition & 1 deletion reginline.h
Expand Up @@ -38,7 +38,7 @@ Perl_regnode_after(pTHX_ const regnode *p, const bool varies)
const U8 op = OP(p);
assert(op < REGNODE_MAX);
const regnode *ret = p + NODE_STEP_REGNODE + REGNODE_ARG_LEN(op);
if (varies || PL_regnode_arg_len_varies[op])
if (varies || REGNODE_ARG_LEN_VARIES(op))
ret += STR_SZ(STR_LEN(p));
return (regnode *)ret;
}
Expand Down

0 comments on commit 79a585d

Please sign in to comment.