diff --git a/embed.fnc b/embed.fnc index 71efeda0dfc4..6af9f8a4fb3c 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1626,7 +1626,7 @@ Cp |void |init_stacks Cp |void |init_tm |NN struct tm *ptm p |void |init_uniprops : Used in perly.y -AMPRTbdp|char * |instr |NN const char *big \ +APRTdmp |char * |instr |NN const char *big \ |NN const char *little Adp |U32 |intro_my ERXp |Size_t |_inverse_folds |const UV cp \ diff --git a/embed.h b/embed.h index fdbcaa1db09b..d2e4576a26e0 100644 --- a/embed.h +++ b/embed.h @@ -307,6 +307,7 @@ # define init_i18nl10n(a) Perl_init_i18nl10n(aTHX_ a) # define init_stacks() Perl_init_stacks(aTHX) # define init_tm(a) Perl_init_tm(aTHX_ a) +# define instr Perl_instr # define intro_my() Perl_intro_my(aTHX) # define isC9_STRICT_UTF8_CHAR Perl_isC9_STRICT_UTF8_CHAR # define isSTRICT_UTF8_CHAR Perl_isSTRICT_UTF8_CHAR diff --git a/mathoms.c b/mathoms.c index d6288c903deb..9592a4fe8750 100644 --- a/mathoms.c +++ b/mathoms.c @@ -802,17 +802,6 @@ Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen)); } -/* return ptr to little string in big string, NULL if not found */ -/* The original version of this routine was donated by Corey Satten. */ - -char * -Perl_instr(const char *big, const char *little) -{ - PERL_ARGS_ASSERT_INSTR; - - return instr(big, little); -} - SV * Perl_newSVsv(pTHX_ SV *const old) { diff --git a/proto.h b/proto.h index 329c5ad318ef..b64d33d759fc 100644 --- a/proto.h +++ b/proto.h @@ -1797,6 +1797,11 @@ Perl_init_uniprops(pTHX) __attribute__visibility__("hidden"); #define PERL_ARGS_ASSERT_INIT_UNIPROPS +/* PERL_CALLCONV char * +Perl_instr(const char *big, const char *little) + __attribute__warn_unused_result__ + __attribute__pure__; */ + PERL_CALLCONV U32 Perl_intro_my(pTHX); #define PERL_ARGS_ASSERT_INTRO_MY @@ -5809,13 +5814,6 @@ PERL_CALLCONV SV ** Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, U32 hash, int flags); # define PERL_ARGS_ASSERT_HV_STORE_FLAGS -PERL_CALLCONV char * -Perl_instr(const char *big, const char *little) - __attribute__warn_unused_result__ - __attribute__pure__; -# define PERL_ARGS_ASSERT_INSTR \ - assert(big); assert(little) - PERL_CALLCONV STRLEN Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end); # define PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF \ diff --git a/util.h b/util.h index 84d0e9f1c8d5..9ef5e38fcbb0 100644 --- a/util.h +++ b/util.h @@ -241,7 +241,7 @@ returning NULL if not found. The terminating NUL bytes are not compared. */ -#define instr(haystack, needle) strstr((char *) haystack, (char *) needle) +#define Perl_instr(haystack, needle) strstr((char *) haystack, (char *) needle) #ifdef HAS_MEMMEM # define ninstr(big, bigend, little, lend) \