[Bast-commits] r4976 - Devel-BeginLift/1.000/branches/entersub_for_cv

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Sat Oct 25 11:16:34 BST 2008


Author: rafl
Date: 2008-10-25 11:16:32 +0100 (Sat, 25 Oct 2008)
New Revision: 4976

Modified:
   Devel-BeginLift/1.000/branches/entersub_for_cv/BeginLift.xs
Log:
Return a nullop if the liftee returns a null sv.

Modified: Devel-BeginLift/1.000/branches/entersub_for_cv/BeginLift.xs
===================================================================
--- Devel-BeginLift/1.000/branches/entersub_for_cv/BeginLift.xs	2008-10-24 21:26:27 UTC (rev 4975)
+++ Devel-BeginLift/1.000/branches/entersub_for_cv/BeginLift.xs	2008-10-25 10:16:32 UTC (rev 4976)
@@ -84,6 +84,11 @@
     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




More information about the Bast-commits mailing list