summaryrefslogtreecommitdiff
path: root/mathoms.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-05-10 22:12:06 -0600
committerKarl Williamson <khw@cpan.org>2016-05-12 20:20:47 -0600
commitfb245905290137157fd278a090bbfd1074d49de0 (patch)
treed70dd218e23e3f773ce650b68c7afe638ffe60ae /mathoms.c
parent3d9637d600ac38511f9e25c1dc51d91ea4a3bf43 (diff)
downloadperl-fb245905290137157fd278a090bbfd1074d49de0.tar.gz
mathoms.c: Remove special casing from instr()
This function was recently moved to mathoms. Now that various changes have been made to the system, the special casing needed to get things to compile can be removed. Also, it can just call the macro implementation, instead of what the macro expands to.
Diffstat (limited to 'mathoms.c')
-rw-r--r--mathoms.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/mathoms.c b/mathoms.c
index 91c11049e4..9ae81abbbd 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -1752,22 +1752,15 @@ Perl_pad_compname_type(pTHX_ const PADOFFSET po)
return PAD_COMPNAME_TYPE(po);
}
-/* now a macro */
/* return ptr to little string in big string, NULL if not found */
-/* This routine was donated by Corey Satten. */
+/* The original version of this routine was donated by Corey Satten. */
char *
Perl_instr(const char *big, const char *little)
{
- /* Porting tests require this macro to be used even though it doesn't exist
- * (except for the commented-out version in proto.h). So provide a commented-out
- * "use" of the prototype and supply a real version of what it expanded to.
PERL_ARGS_ASSERT_INSTR;
- */
- assert(big);
- assert(little);
- return strstr((char*)big, (char*)little);
+ return instr((char *) big, (char *) little);
}
#endif /* NO_MATHOMS */