This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use my_memrchr helper for portability
authorNicolas R <atoomic@cpan.org>
Mon, 6 Nov 2017 23:03:03 +0000 (16:03 -0700)
committerNicolas R <atoomic@cpan.org>
Mon, 6 Nov 2017 23:07:05 +0000 (16:07 -0700)
Recent commit '8725053bce' breaks darwin compilation.

We should use my_memrchr helper to avoid
portability issues, instead of calling
directly memrchr.

op.c

diff --git a/op.c b/op.c
index de6291a..c61bfd0 100644 (file)
--- a/op.c
+++ b/op.c
@@ -9672,7 +9672,7 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
 
        PL_compcv = 0;
        if (name && block) {
-           const char *s = (char *) memrchr(name, ':', namlen);
+           const char *s = (char *) my_memrchr(name, ':', namlen);
            s = s ? s+1 : name;
            if (strEQ(s, "BEGIN")) {
                if (PL_in_eval & EVAL_KEEPERR)