projects
/
p5sagit/Devel-BeginLift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
9fb2198
)
Don't return a const op for a null sv.
Florian Ragwitz [Sat, 18 Oct 2008 12:22:44 +0000 (12:22 +0000)]
BeginLift.xs
patch
|
blob
|
blame
|
history
diff --git
a/BeginLift.xs
b/BeginLift.xs
index
339f538
..
9318f0e
100644
(file)
--- a/
BeginLift.xs
+++ b/
BeginLift.xs
@@
-137,6
+137,11
@@
STATIC OP *dbl_ck_entersub(pTHX_ OP *o) {
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