summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-03-27 12:44:54 -0600
committerKarl Williamson <khw@cpan.org>2018-03-31 15:36:45 -0600
commitaf0d73851cb67171ca4d0cf5073dee30ffe912cb (patch)
treef5eae343b82a662fb9e6fd64caf2c73fcf16d0e0 /utf8.c
parentc12658c9d0519a31658b990ce533a92a2269ff9a (diff)
downloadperl-af0d73851cb67171ca4d0cf5073dee30ffe912cb.tar.gz
utf8.c: Change no longer used params to dummys
The previous commits have caused certain parameters to be ignored in some calls to these functions. Change them to dummys, so if a mistake is made, it can be caught, and not promulgated
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c38
1 files changed, 23 insertions, 15 deletions
diff --git a/utf8.c b/utf8.c
index c50fcd6628..f83280fcba 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2858,7 +2858,9 @@ Perl__is_utf8_idstart(pTHX_ const U8 *p)
if (*p == '_')
return TRUE;
- return is_utf8_common(p, &PL_utf8_idstart, "IdStart", PL_utf8_idstart);
+ return is_utf8_common(p, NULL,
+ "This is buggy if this gets used",
+ PL_utf8_idstart);
}
bool
@@ -3216,6 +3218,8 @@ S_is_utf8_common(pTHX_ const U8 *const p, SV **swash,
return _invlist_contains_cp(invlist, valid_utf8_to_uvchr(p, NULL));
}
+ assert(swash);
+
if (!*swash) {
U8 flags = _CORE_SWASH_INIT_ACCEPT_INVLIST;
*swash = _core_swash_init("utf8",
@@ -3255,6 +3259,8 @@ S_is_utf8_common_with_len(pTHX_ const U8 *const p, const U8 * const e,
return _invlist_contains_cp(invlist, valid_utf8_to_uvchr(p, NULL));
}
+ assert(swash);
+
if (!*swash) {
U8 flags = _CORE_SWASH_INIT_ACCEPT_INVLIST;
*swash = _core_swash_init("utf8",
@@ -3340,8 +3346,8 @@ Perl__is_utf8_FOO(pTHX_ U8 classnum,
case _CC_CASED:
return is_utf8_common(p,
- &PL_utf8_swash_ptrs[classnum],
- swash_property_names[classnum],
+ NULL,
+ "This is buggy if this gets used",
PL_XPosix_ptrs[classnum]);
case _CC_SPACE:
@@ -3357,11 +3363,13 @@ Perl__is_utf8_FOO(pTHX_ U8 classnum,
case _CC_VERTSPACE:
return is_VERTWS_high(p);
case _CC_IDFIRST:
- return is_utf8_common(p, &PL_utf8_perl_idstart,
- "_Perl_IDStart", PL_utf8_perl_idstart);
+ return is_utf8_common(p, NULL,
+ "This is buggy if this gets used",
+ PL_utf8_perl_idstart);
case _CC_IDCONT:
- return is_utf8_common(p, &PL_utf8_perl_idcont,
- "_Perl_IDCont", PL_utf8_perl_idcont);
+ return is_utf8_common(p, NULL,
+ "This is buggy if this gets used",
+ PL_utf8_perl_idcont);
}
}
@@ -3402,10 +3410,8 @@ Perl__is_utf8_FOO_with_len(pTHX_ const U8 classnum, const U8 *p,
assert(classnum < _FIRST_NON_SWASH_CC);
- return is_utf8_common_with_len(p,
- e,
- &PL_utf8_swash_ptrs[classnum],
- swash_property_names[classnum],
+ return is_utf8_common_with_len(p, e, NULL,
+ "This is buggy if this gets used",
PL_XPosix_ptrs[classnum]);
}
@@ -3414,8 +3420,9 @@ Perl__is_utf8_perl_idstart_with_len(pTHX_ const U8 *p, const U8 * const e)
{
PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART_WITH_LEN;
- return is_utf8_common_with_len(p, e, &PL_utf8_perl_idstart,
- "_Perl_IDStart", PL_utf8_perl_idstart);
+ return is_utf8_common_with_len(p, e, NULL,
+ "This is buggy if this gets used",
+ PL_utf8_perl_idstart);
}
bool
@@ -3433,8 +3440,9 @@ Perl__is_utf8_perl_idcont_with_len(pTHX_ const U8 *p, const U8 * const e)
{
PERL_ARGS_ASSERT__IS_UTF8_PERL_IDCONT_WITH_LEN;
- return is_utf8_common_with_len(p, e, &PL_utf8_perl_idcont,
- "_Perl_IDCont", PL_utf8_perl_idcont);
+ return is_utf8_common_with_len(p, e, NULL,
+ "This is buggy if this gets used",
+ PL_utf8_perl_idcont);
}
bool