Skip to content

Commit

Permalink
Remove mathoms.c stub Perl_instr()
Browse files Browse the repository at this point in the history
This is now entirely implemented by macros
  • Loading branch information
khwilliamson committed Oct 28, 2024
1 parent 0d6c2e8 commit 1e1ce50
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions mathoms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
12 changes: 5 additions & 7 deletions proto.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 1e1ce50

Please sign in to comment.