Skip to content

Commit

Permalink
Only invoke the infix plugin on the unlikely case that it is actually…
Browse files Browse the repository at this point in the history
… defined
  • Loading branch information
leonerd committed May 4, 2021
1 parent 2a7819e commit 56eb009
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion toke.c
Expand Up @@ -115,6 +115,8 @@ static const char* const ident_var_zero_multi_digit = "Numeric variables with mo
* 1999-02-27 mjd-perl-patch@plover.com */
#define isCONTROLVAR(x) (isUPPER(x) || memCHRs("[\\]^_?", (x)))

#define PLUGINFIX_IS_ENABLED UNLIKELY(PL_infix_plugin != &Perl_infix_plugin_standard)

#define SPACE_OR_TAB(c) isBLANK_A(c)

#define HEXFP_PEEK(s) \
Expand Down Expand Up @@ -8641,7 +8643,7 @@ yyl_keylookup(pTHX_ char *s, GV *gv)
}

/* Check for plugged-in named operator */
{
if(PLUGINFIX_IS_ENABLED) {
struct Perl_custom_infix *def;
int result;
result = PL_infix_plugin(aTHX_ PL_tokenbuf, len, &def);
Expand Down

0 comments on commit 56eb009

Please sign in to comment.