summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-01-16 16:09:39 -0700
committerKarl Williamson <khw@cpan.org>2020-01-23 15:46:56 -0700
commit5e6ebb121e85847e480061b087a1c6fe206e6c3a (patch)
treed1969c0e839254b5592520aada53ee7746ea3f5c /handy.h
parent6bbb95d461386ba11dd9774938f86c634974ae58 (diff)
downloadperl-5e6ebb121e85847e480061b087a1c6fe206e6c3a.tar.gz
Move cntrl_to_mnemonic() to util.c from regcomp.c
This is in preparation for it being used elsewhere, to reduce duplication of code.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/handy.h b/handy.h
index a7a75f1d64..e5062e647a 100644
--- a/handy.h
+++ b/handy.h
@@ -1497,8 +1497,11 @@ END_EXTERN_C
_generic_isCC(c, _CC_NON_FINAL_FOLD)
# define _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) \
_generic_isCC(c, _CC_IS_IN_SOME_FOLD)
-# define _IS_MNEMONIC_CNTRL_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) \
- _generic_isCC(c, _CC_MNEMONIC_CNTRL)
+
+/* is c a control character for which we have a mnemonic? */
+# if defined(PERL_CORE) || defined(PERL_EXT)
+# define isMNEMONIC_CNTRL(c) _generic_isCC(c, _CC_MNEMONIC_CNTRL)
+# endif
#else /* else we don't have perl.h H_PERL */
/* If we don't have perl.h, we are compiling a utility program. Below we