From: Florian Ragwitz Date: Sat, 25 Oct 2008 10:16:32 +0000 (+0000) Subject: Return a nullop if the liftee returns a null sv. X-Git-Tag: 0.001001~1^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd42c00abd6f43439f783bb2fd4082f1533b8ab8;p=p5sagit%2FDevel-BeginLift.git Return a nullop if the liftee returns a null sv. --- diff --git a/BeginLift.xs b/BeginLift.xs index dd68f18..0030357 100644 --- a/BeginLift.xs +++ b/BeginLift.xs @@ -84,6 +84,11 @@ STATIC OP *lift_cb(pTHX_ OP *o, CV *cv, void *user_data) { if (type == OP_RV2GV) return newGVOP(OP_GV, 0, (GV*)sv); + if (SvTYPE(sv) == SVt_NULL) { + op_free(o); + return newOP(OP_NULL, 0); + } + return newSVOP(OP_CONST, 0, sv); } else { /* this bit not lifted, handles the 'sub doesn't return stuff' case