summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
Diffstat (limited to 'op.h')
-rw-r--r--op.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/op.h b/op.h
index 95ecf87ecc..454cbf7bca 100644
--- a/op.h
+++ b/op.h
@@ -313,6 +313,9 @@ struct loop {
# define cGVOPo_set(v) (PL_curpad[cPADOPo->op_padix] = (SV*)(v))
# define kGVOP_set(v) (PL_curpad[kPADOP->op_padix] = (SV*)(v))
# define IS_PADGV(v) (v && SvTYPE(v) == SVt_PVGV && GvIN_PAD(v))
+# define IS_PADCONST(v) (v && SvREADONLY(v))
+# define cSVOPx_sv(v) (cSVOPx(v)->op_sv \
+ ? cSVOPx(v)->op_sv : PL_curpad[(v)->op_targ])
#else
# define cGVOPx(o) ((GV*)cSVOPx(o)->op_sv)
# define cGVOP ((GV*)cSVOP->op_sv)
@@ -322,8 +325,14 @@ struct loop {
# define cGVOPo_set(v) (cPADOPo->op_sv = (SV*)(v))
# define kGVOP_set(v) (kPADOP->op_sv = (SV*)(v))
# define IS_PADGV(v) FALSE
+# define IS_PADCONST(v) FALSE
+# define cSVOPx_sv(v) (cSVOPx(v)->op_sv)
#endif
+#define cSVOP_sv cSVOPx_sv(PL_op)
+#define cSVOPo_sv cSVOPx_sv(o)
+#define kSVOP_sv cSVOPx_sv(kid)
+
#define Nullop Null(OP*)
/* Lowest byte of PL_opargs */