From 11c6e5fc65f26ba5219997d19707b998a9abf26d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 7 Mar 2020 22:52:33 +0000 Subject: tl20 perl 5.30.1 for Windows, from Siep git-svn-id: svn://tug.org/texlive/trunk@54166 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/CORE/invlist_inline.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'Master/tlpkg/tlperl/lib/CORE/invlist_inline.h') diff --git a/Master/tlpkg/tlperl/lib/CORE/invlist_inline.h b/Master/tlpkg/tlperl/lib/CORE/invlist_inline.h index 3a1afc695dc..4bab3d83a69 100644 --- a/Master/tlpkg/tlperl/lib/CORE/invlist_inline.h +++ b/Master/tlpkg/tlperl/lib/CORE/invlist_inline.h @@ -6,7 +6,10 @@ * License or the Artistic License, as specified in the README file. */ -#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) +#ifndef PERL_INVLIST_INLINE_H_ +#define PERL_INVLIST_INLINE_H_ + +#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_PP_C) /* An element is in an inversion list iff its index is even numbered: 0, 2, 4, * etc */ @@ -17,6 +20,12 @@ #define TO_INTERNAL_SIZE(x) ((x) * sizeof(UV)) #define FROM_INTERNAL_SIZE(x) ((x)/ sizeof(UV)) +PERL_STATIC_INLINE bool +S_is_invlist(SV* const invlist) +{ + return invlist != NULL && SvTYPE(invlist) == SVt_INVLIST; +} + PERL_STATIC_INLINE bool* S_get_invlist_offset_addr(SV* invlist) { @@ -24,7 +33,7 @@ S_get_invlist_offset_addr(SV* invlist) * offset (it contains 1) or not (contains 0) */ PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR; - assert(SvTYPE(invlist) == SVt_INVLIST); + assert(is_invlist(invlist)); return &(((XINVLIST*) SvANY(invlist))->is_offset); } @@ -37,7 +46,7 @@ S__invlist_len(SV* const invlist) PERL_ARGS_ASSERT__INVLIST_LEN; - assert(SvTYPE(invlist) == SVt_INVLIST); + assert(is_invlist(invlist)); return (SvCUR(invlist) == 0) ? 0 @@ -77,7 +86,7 @@ S_invlist_array(SV* const invlist) return ((UV *) SvPVX(invlist) + *get_invlist_offset_addr(invlist)); } -# if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGEXEC_C) +# if defined(PERL_IN_REGEXEC_C) /* These symbols are only needed later in regcomp.c */ # undef TO_INTERNAL_SIZE @@ -85,3 +94,5 @@ S_invlist_array(SV* const invlist) # endif #endif + +#endif /* PERL_INVLIST_INLINE_H_ */ -- cgit v1.2.3