summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/pp.h b/pp.h
index 0eac5a56f9..11dd9d0e82 100644
--- a/pp.h
+++ b/pp.h
@@ -49,6 +49,8 @@
#define dTARG SV *targ
+#define dXS_TARGET SV * targ = (PL_op->op_private & OPpENTERSUB_HASTARG ? PAD_SV(PL_op->op_targ) : sv_newmortal())
+
#define NORMAL PL_op->op_next
#define DIE return Perl_die
@@ -64,6 +66,11 @@
#define POPi ((IV)SvIVx(POPs))
#define POPu ((UV)SvUVx(POPs))
#define POPl ((long)SvIVx(POPs))
+#define POPul ((unsigned long)SvIVx(POPs))
+#ifdef HAS_QUAD
+#define POPq ((Quad_t)SvIVx(POPs))
+#define POPuq ((Uquad_t)SvUVx(POPs))
+#endif
#define TOPs (*sp)
#define TOPp (SvPV(TOPs, PL_na)) /* deprecated */
@@ -72,6 +79,11 @@
#define TOPi ((IV)SvIV(TOPs))
#define TOPu ((UV)SvUV(TOPs))
#define TOPl ((long)SvIV(TOPs))
+#define TOPul ((unsigned long)SvUV(TOPs))
+#ifdef HAS_QUAD
+#define TOPq ((Quad_t)SvIV(TOPs))
+#define TOPuq ((Uquad_t)SvUV(TOPs))
+#endif
/* Go to some pains in the rare event that we must extend the stack. */
#define EXTEND(p,n) STMT_START { if (PL_stack_max - p < (n)) { \
@@ -115,6 +127,12 @@
#define dPOPiv IV value = POPi
#define dTOPuv UV value = TOPu
#define dPOPuv UV value = POPu
+#ifdef HAS_QUAD
+#define dTOPqv Quad_t value = TOPu
+#define dPOPqv Quad_t value = POPu
+#define dTOPuqv Uquad_t value = TOPuq
+#define dPOPuqv Uquad_t value = POPuq
+#endif
#define dPOPXssrl(X) SV *right = POPs; SV *left = CAT2(X,s)
#define dPOPXnnrl(X) NV right = POPn; NV left = CAT2(X,n)