Document *_for_cv.
[p5sagit/Devel-BeginLift.git] / BeginLift.xs
index dd68f18..9794747 100644 (file)
@@ -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
@@ -98,13 +103,13 @@ MODULE = Devel::BeginLift  PACKAGE = Devel::BeginLift
 PROTOTYPES: DISABLE
 
 UV
-_setup (CV *cv)
+setup_for_cv (class, CV *cv)
   CODE:
     RETVAL = (UV)hook_op_check_entersubforcv (cv, lift_cb, NULL);
   OUTPUT:
     RETVAL
 
 void
-_teardown (UV id)
+teardown_for_cv (class, UV id)
   CODE:
     hook_op_check_entersubforcv_remove ((hook_op_check_id)id);