diff options
author | Karl Williamson <khw@cpan.org> | 2017-03-25 12:45:34 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-11-01 10:54:01 -0600 |
commit | 6dba01e208bb15b8b85382de24ba78de7d43667b (patch) | |
tree | 4cbdef4e13eb85771ad613c87e3d6f3c8a47106b /embed.h | |
parent | 70250a0bc924bd7e738cf4f0014883dfc35d80a8 (diff) | |
download | perl-6dba01e208bb15b8b85382de24ba78de7d43667b.tar.gz |
Add my_memrchr() implementation of memrchr()
On platforms that have memrchr(), my_mrchr() maps to use that instead.
This is useful functionality, lacking on many platforms. This commit
also uses the new function in two places in the core where the comments
previously indicated it would be advantageous to use it if we had it.
It is left usable only in core, so that if this turns out to have been a
bad idea, it can be easily removed.
Diffstat (limited to 'embed.h')
-rw-r--r-- | embed.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -942,6 +942,9 @@ #define validate_proto(a,b,c,d) Perl_validate_proto(aTHX_ a,b,c,d) #define vivify_defelem(a) Perl_vivify_defelem(aTHX_ a) #define yylex() Perl_yylex(aTHX) +# if ! defined(HAS_MEMRCHR) && (defined(PERL_CORE) || defined(PERL_EXT)) +#define my_memrchr S_my_memrchr +# endif # if !defined(PERL_EXT_RE_BUILD) # if defined(PERL_IN_REGCOMP_C) #define _append_range_to_invlist(a,b,c) S__append_range_to_invlist(aTHX_ a,b,c) |