summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-12-09 20:27:02 -0700
committerKarl Williamson <khw@cpan.org>2019-12-11 07:30:17 -0700
commitd1c7f3436a105c18cc516aac6a7447e185b2bc8a (patch)
treec0b6df299ecec206a0d2e87be6142fbbf756ee4c
parentcd9d511e43ea1cf8e1ecd7f32676e9e26554ada2 (diff)
downloadperl-d1c7f3436a105c18cc516aac6a7447e185b2bc8a.tar.gz
Rmv leading underscore from macro name
These are illegal in C, but we have plenty of them around; I happened to be looking at this function, and decided to fix it. Note that only the macro name is illegal; the function was fine, but to change the macro name means changing the function one.
-rw-r--r--embed.fnc4
-rw-r--r--embed.h4
-rw-r--r--proto.h6
-rw-r--r--regexec.c4
-rw-r--r--toke.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/embed.fnc b/embed.fnc
index 3abf9579da..777e532785 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2761,8 +2761,8 @@ ESR |bool |regtail_study |NN RExC_state_t *pRExC_state \
EXRp |bool |isFOO_lc |const U8 classnum|const U8 character
#endif
-#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C)
-ERp |bool |_is_grapheme |NN const U8 * strbeg|NN const U8 * s|NN const U8 *strend|const UV cp
+#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
+ERp |bool |is_grapheme |NN const U8 * strbeg|NN const U8 * s|NN const U8 *strend|const UV cp
#endif
#if defined(PERL_IN_REGEXEC_C)
diff --git a/embed.h b/embed.h
index 21d26d6423..9ee8b75182 100644
--- a/embed.h
+++ b/embed.h
@@ -1156,8 +1156,8 @@
#define to_byte_substr(a) S_to_byte_substr(aTHX_ a)
#define to_utf8_substr(a) S_to_utf8_substr(aTHX_ a)
# endif
-# if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C)
-#define _is_grapheme(a,b,c,d) Perl__is_grapheme(aTHX_ a,b,c,d)
+# if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
+#define is_grapheme(a,b,c,d) Perl_is_grapheme(aTHX_ a,b,c,d)
# endif
# if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
#define isFOO_lc(a,b) Perl_isFOO_lc(aTHX_ a,b)
diff --git a/proto.h b/proto.h
index 364b12e8c7..130cdf92fa 100644
--- a/proto.h
+++ b/proto.h
@@ -6097,10 +6097,10 @@ STATIC void S_to_utf8_substr(pTHX_ regexp * prog);
#define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR \
assert(prog)
#endif
-#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C)
-PERL_CALLCONV bool Perl__is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 *strend, const UV cp)
+#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV bool Perl_is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 *strend, const UV cp)
__attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__IS_GRAPHEME \
+#define PERL_ARGS_ASSERT_IS_GRAPHEME \
assert(strbeg); assert(s); assert(strend)
#endif
diff --git a/regexec.c b/regexec.c
index a61ec91f83..21f3972050 100644
--- a/regexec.c
+++ b/regexec.c
@@ -10641,7 +10641,7 @@ S_to_byte_substr(pTHX_ regexp *prog)
#ifndef PERL_IN_XSUB_RE
bool
-Perl__is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 * strend, const UV cp)
+Perl_is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 * strend, const UV cp)
{
/* Temporary helper function for toke.c. Verify that the code point 'cp'
* is a stand-alone grapheme. The UTF-8 for 'cp' begins at position 's' in
@@ -10657,7 +10657,7 @@ Perl__is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 * strend, cons
GCB_enum cp_gcb_val, prev_cp_gcb_val, next_cp_gcb_val;
const U8 * prev_cp_start;
- PERL_ARGS_ASSERT__IS_GRAPHEME;
+ PERL_ARGS_ASSERT_IS_GRAPHEME;
if ( UNLIKELY(UNICODE_IS_SUPER(cp))
|| UNLIKELY(UNICODE_IS_NONCHAR(cp)))
diff --git a/toke.c b/toke.c
index ab358a1540..6f38a599d4 100644
--- a/toke.c
+++ b/toke.c
@@ -11017,7 +11017,7 @@ Perl_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int
}
else {
termcode = utf8_to_uvchr_buf((U8*)s, (U8*)PL_bufend, &termlen);
- if (UTF && UNLIKELY(! _is_grapheme((U8 *) start,
+ if (UTF && UNLIKELY(! is_grapheme((U8 *) start,
(U8 *) s,
(U8 *) PL_bufend,
termcode)))
@@ -11089,7 +11089,7 @@ Perl_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int
&& memEQ(s + 1, (char*)termstr + 1, termlen - 1))
{
if ( UTF
- && UNLIKELY(! _is_grapheme((U8 *) start,
+ && UNLIKELY(! is_grapheme((U8 *) start,
(U8 *) s,
(U8 *) PL_bufend,
termcode)))