diff options
author | Karl Williamson <khw@cpan.org> | 2016-05-10 22:17:22 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-05-12 20:24:55 -0600 |
commit | b8070b0795640313148acfe846c5f9320bec5745 (patch) | |
tree | efdf6391485e5c57c05afc70e0e0bc16e4e054bf /util.c | |
parent | 5f81fa4069cb15ccd77b1c4253c870df84c1788a (diff) | |
download | perl-b8070b0795640313148acfe846c5f9320bec5745.tar.gz |
Use memmem() if available on the platform for Perl_ninstr()
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -584,6 +584,11 @@ char * Perl_ninstr(const char *big, const char *bigend, const char *little, const char *lend) { PERL_ARGS_ASSERT_NINSTR; + +#ifdef HAS_MEMMEM + return ninstr(big, bigend, little, lend); +#else + if (little >= lend) return (char*)big; { @@ -602,6 +607,9 @@ Perl_ninstr(const char *big, const char *bigend, const char *little, const char } } return NULL; + +#endif + } /* |