This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Zero new XOPs xop_desc will never be invalid
authorFlorian Ragwitz <rafl@debian.org>
Mon, 15 Nov 2010 09:06:01 +0000 (10:06 +0100)
committerFlorian Ragwitz <rafl@debian.org>
Mon, 15 Nov 2010 09:06:01 +0000 (10:06 +0100)
Even if the xop description couldn't be fetched from PL_custom_op_descs.

op.c

diff --git a/op.c b/op.c
index b132665..65f940c 100644 (file)
--- a/op.c
+++ b/op.c
@@ -10082,7 +10082,7 @@ Perl_custom_op_xop(pTHX_ const OP *o)
        STRLEN l;
 
        /* XXX does all this need to be shared mem? */
-       Newx(xop, 1, XOP);
+       Newxz(xop, 1, XOP);
        pv = SvPV(HeVAL(he), l);
        XopENTRY_set(xop, xop_name, savepvn(pv, l));
        if (PL_custom_op_descs &&