Skip to content

Commit ba4bfb0

Browse files
committed
S_is_utf8_common: Use ARGS_ASSERT over assert()
Remove the explicit assert() and change embed.fnc so that it gets automatically generated.
1 parent 711c8ba commit ba4bfb0

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6111,7 +6111,7 @@ RTi |int |isFF_overlong |NN const U8 * const s \
61116111
|const STRLEN len
61126112
Ri |bool |is_utf8_common |NN const U8 * const p \
61136113
|NN const U8 * const e \
6114-
|NULLOK SV * const invlist
6114+
|NN SV * const invlist
61156115
RTi |int |is_utf8_overlong \
61166116
|NN const U8 * const s \
61176117
|const STRLEN len

proto.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

utf8.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3852,20 +3852,19 @@ PERL_STATIC_INLINE bool
38523852
S_is_utf8_common(pTHX_ const U8 *const p, const U8 * const e,
38533853
SV* const invlist)
38543854
{
3855+
PERL_ARGS_ASSERT_IS_UTF8_COMMON;
3856+
38553857
/* returns a boolean giving whether or not the UTF8-encoded character that
38563858
* starts at <p>, and extending no further than <e - 1> is in the inversion
38573859
* list <invlist>. */
38583860

38593861
UV cp = utf8n_to_uvchr(p, e - p, NULL, 0);
38603862

3861-
PERL_ARGS_ASSERT_IS_UTF8_COMMON;
3862-
38633863
if (cp == 0 && (p >= e || *p != '\0')) {
38643864
force_out_malformed_utf8_message_(p, e, 0, MALFORMED_UTF8_DIE);
38653865
NOT_REACHED; /* NOTREACHED */
38663866
}
38673867

3868-
assert(invlist);
38693868
return _invlist_contains_cp(invlist, cp);
38703869
}
38713870

0 commit comments

Comments
 (0)