From 0f9a6232f0af0895807ddd0afae2d5512aa91bf9 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Fri, 25 Jan 2019 10:32:42 +1100 Subject: PERL_OP_PARENT is always defined, stop testing for it PERL_OP_PARENT is the new reality, leaving the pre-processor checks is more confusing that anything else. I left the test in perl.c for consistency with the other checks in that code. --- ext/B/B.pm | 2 +- ext/B/B.xs | 4 ---- ext/B/t/b.t | 4 +--- ext/XS-APItest/APItest.pm | 2 +- ext/XS-APItest/APItest.xs | 2 -- 5 files changed, 3 insertions(+), 11 deletions(-) (limited to 'ext') diff --git a/ext/B/B.pm b/ext/B/B.pm index 5ec8b8c788..2d9b2d064d 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -20,7 +20,7 @@ sub import { # walkoptree comes from B.xs BEGIN { - $B::VERSION = '1.75'; + $B::VERSION = '1.76'; @B::EXPORT_OK = (); # Our BOOT code needs $VERSION set, and will append to @EXPORT_OK. diff --git a/ext/B/B.xs b/ext/B/B.xs index d9d77157c6..d8fc22a1fa 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -635,11 +635,7 @@ BOOT: cv = newXS("B::diehook", intrpvar_sv_common, file); ASSIGN_COMMON_ALIAS(I, diehook); sv = get_sv("B::OP::does_parent", GV_ADDMULTI); -#ifdef PERL_OP_PARENT sv_setsv(sv, &PL_sv_yes); -#else - sv_setsv(sv, &PL_sv_no); -#endif } void diff --git a/ext/B/t/b.t b/ext/B/t/b.t index 09dba39b1d..e1279ff935 100644 --- a/ext/B/t/b.t +++ b/ext/B/t/b.t @@ -460,9 +460,7 @@ is $regexp->precomp, 'fit', 'pmregexp returns the right regexp'; # test op_parent SKIP: { - unless ($B::OP::does_parent) { - skip "op_parent only present with -DPERL_OP_PARENT builds", 6; - } + ok($B::OP::does_parent, "does_parent always set"); my $lineseq = B::svref_2object(sub{my $x = 1})->ROOT->first; is ($lineseq->type, B::opnumber('lineseq'), 'op_parent: top op is lineseq'); diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm index 61531fc97a..ba76d8f4da 100644 --- a/ext/XS-APItest/APItest.pm +++ b/ext/XS-APItest/APItest.pm @@ -5,7 +5,7 @@ use strict; use warnings; use Carp; -our $VERSION = '0.99'; +our $VERSION = '1.00'; require XSLoader; diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index a30659f14f..e77ff44f33 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -4197,7 +4197,6 @@ CODE: /* The slab allocator does not like CvROOT being set. */ CvROOT(PL_compcv) = (OP *)1; o = newFOROP(0, 0, newOP(OP_PUSHMARK, 0), 0, 0); -#ifdef PERL_OP_PARENT if (cLOOPx(cUNOPo->op_first)->op_last->op_sibparent != cUNOPo->op_first) { @@ -4205,7 +4204,6 @@ CODE: RETVAL = FALSE; } else -#endif /* If we do not crash before returning, the test passes. */ RETVAL = TRUE; op_free(o); -- cgit v1.2.1