Skip to content

Commit 1e1ce50

Browse files
committed
Remove mathoms.c stub Perl_instr()
This is now entirely implemented by macros
1 parent 0d6c2e8 commit 1e1ce50

File tree

5 files changed

+8
-20
lines changed

5 files changed

+8
-20
lines changed

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ Cp |void |init_stacks
16261626
Cp |void |init_tm |NN struct tm *ptm
16271627
p |void |init_uniprops
16281628
: Used in perly.y
1629-
AMPRTbdp|char * |instr |NN const char *big \
1629+
APRTdmp |char * |instr |NN const char *big \
16301630
|NN const char *little
16311631
Adp |U32 |intro_my
16321632
ERXp |Size_t |_inverse_folds |const UV cp \

embed.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@
307307
# define init_i18nl10n(a) Perl_init_i18nl10n(aTHX_ a)
308308
# define init_stacks() Perl_init_stacks(aTHX)
309309
# define init_tm(a) Perl_init_tm(aTHX_ a)
310+
# define instr Perl_instr
310311
# define intro_my() Perl_intro_my(aTHX)
311312
# define isC9_STRICT_UTF8_CHAR Perl_isC9_STRICT_UTF8_CHAR
312313
# define isSTRICT_UTF8_CHAR Perl_isSTRICT_UTF8_CHAR

mathoms.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -802,17 +802,6 @@ Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
802802
return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen));
803803
}
804804

805-
/* return ptr to little string in big string, NULL if not found */
806-
/* The original version of this routine was donated by Corey Satten. */
807-
808-
char *
809-
Perl_instr(const char *big, const char *little)
810-
{
811-
PERL_ARGS_ASSERT_INSTR;
812-
813-
return instr(big, little);
814-
}
815-
816805
SV *
817806
Perl_newSVsv(pTHX_ SV *const old)
818807
{

proto.h

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ returning NULL if not found. The terminating NUL bytes are not compared.
241241
*/
242242

243243

244-
#define instr(haystack, needle) strstr((char *) haystack, (char *) needle)
244+
#define Perl_instr(haystack, needle) strstr((char *) haystack, (char *) needle)
245245

246246
#ifdef HAS_MEMMEM
247247
# define ninstr(big, bigend, little, lend) \

0 commit comments

Comments
 (0)