summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-01 03:45:13 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-01 03:45:13 +0000
commit638eceb6656bf10acb1a6dc2a55880f5e1a6c8c4 (patch)
tree35c02afc07b97e44b7d4abdf0b4829f850a890a3 /op.h
parent7766f1371a6d2b58d0f46fbe6a60785860a39c1e (diff)
downloadperl-638eceb6656bf10acb1a6dc2a55880f5e1a6c8c4.tar.gz
minor USE_ITHREADS tweaks
p4raw-id: //depot/perl@4603
Diffstat (limited to 'op.h')
-rw-r--r--op.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/op.h b/op.h
index 454cbf7bca..5231a4131c 100644
--- a/op.h
+++ b/op.h
@@ -305,33 +305,27 @@ struct loop {
#ifdef USE_ITHREADS
-# define cGVOPx(o) ((GV*)PAD_SV(cPADOPx(o)->op_padix))
-# define cGVOP ((GV*)PAD_SV(cPADOP->op_padix))
-# define cGVOPo ((GV*)PAD_SV(cPADOPo->op_padix))
-# define kGVOP ((GV*)PAD_SV(kPADOP->op_padix))
-# define cGVOP_set(v) (PL_curpad[cPADOP->op_padix] = (SV*)(v))
-# define cGVOPo_set(v) (PL_curpad[cPADOPo->op_padix] = (SV*)(v))
-# define kGVOP_set(v) (PL_curpad[kPADOP->op_padix] = (SV*)(v))
+# define cGVOPx_gv(o) ((GV*)PL_curpad[cPADOPx(o)->op_padix])
# 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])
+# define cSVOPx_svp(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)
-# define cGVOPo ((GV*)cSVOPo->op_sv)
-# define kGVOP ((GV*)kSVOP->op_sv)
-# define cGVOP_set(v) (cPADOP->op_sv = (SV*)(v))
-# define cGVOPo_set(v) (cPADOPo->op_sv = (SV*)(v))
-# define kGVOP_set(v) (kPADOP->op_sv = (SV*)(v))
+# define cGVOPx_gv(o) ((GV*)cSVOPx(o)->op_sv)
# define IS_PADGV(v) FALSE
# define IS_PADCONST(v) FALSE
# define cSVOPx_sv(v) (cSVOPx(v)->op_sv)
+# define cSVOPx_svp(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 cGVOP_gv cGVOPx_gv(PL_op)
+#define cGVOPo_gv cGVOPx_gv(o)
+#define kGVOP_gv cGVOPx_gv(kid)
+#define cSVOP_sv cSVOPx_sv(PL_op)
+#define cSVOPo_sv cSVOPx_sv(o)
+#define kSVOP_sv cSVOPx_sv(kid)
#define Nullop Null(OP*)