X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp.h;h=4474d1ad1cbcb12d32c47c12bbbbc74fe6d65af7;hb=349b520e234d80b6e0b5e71ce38de85721a7d943;hp=81bf0225a177b94b097b806383ecc8666a007ca3;hpb=78f9721bf0dc33981bedf125bcfa5c0c42b69eba;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp.h b/pp.h index 81bf022..4474d1a 100644 --- a/pp.h +++ b/pp.h @@ -55,6 +55,7 @@ Refetch the stack pointer. Used after a callback. See L. =cut */ +#undef SP /* Solaris 2.7 i386 has this in /usr/include/sys/reg.h */ #define SP sp #define MARK mark #define TARG targ @@ -66,8 +67,8 @@ Refetch the stack pointer. Used after a callback. See L. #define TOPMARK (*PL_markstack_ptr) #define POPMARK (*PL_markstack_ptr--) -#define djSP register SV **sp = PL_stack_sp -#define dSP djSP +#define dSP register SV **sp = PL_stack_sp +#define djSP dSP #define dMARK register SV **mark = PL_stack_base + POPMARK #define dORIGMARK I32 origmark = mark - PL_stack_base #define SETORIGMARK origmark = mark - PL_stack_base @@ -99,7 +100,16 @@ See C and L for other uses. Pops an SV off the stack. =for apidoc Amn|char*|POPp +Pops a string off the stack. Deprecated. New code should provide +a STRLEN n_a and use POPpx. + +=for apidoc Amn|char*|POPpx Pops a string off the stack. +Requires a variable STRLEN n_a in scope. + +=for apidoc Amn|char*|POPpbytex +Pops a string off the stack which must consist of bytes i.e. characters < 256. +Requires a variable STRLEN n_a in scope. =for apidoc Amn|NV|POPn Pops a double off the stack. @@ -121,6 +131,7 @@ Pops a long off the stack. #define POPs (*sp--) #define POPp (SvPVx(POPs, PL_na)) /* deprecated */ #define POPpx (SvPVx(POPs, n_a)) +#define POPpbytex (SvPVbytex(POPs, n_a)) #define POPn (SvNVx(POPs)) #define POPi ((IV)SvIVx(POPs)) #define POPu ((UV)SvUVx(POPs)) @@ -133,6 +144,7 @@ Pops a long off the stack. #define TOPs (*sp) #define TOPm1s (*(sp-1)) +#define TOPp1s (*(sp+1)) #define TOPp (SvPV(TOPs, PL_na)) /* deprecated */ #define TOPpx (SvPV(TOPs, n_a)) #define TOPn (SvNV(TOPs)) @@ -332,6 +344,7 @@ See C. if (PL_amagic_generation) { \ SV* tmpsv; \ SV* arg= sp[shift]; \ + if(0) goto am_again; /* shut up unused warning */ \ am_again: \ if ((SvAMAGIC(arg))&&\ (tmpsv=AMG_CALLun(arg,meth))) {\ @@ -386,4 +399,4 @@ See C. True if this op will be the return value of an lvalue subroutine =cut */ -#define LVRET ((PL_op->op_private & OPpMAYBE_LVSUB) && Perl_is_lvalue_sub()) +#define LVRET ((PL_op->op_private & OPpMAYBE_LVSUB) && is_lvalue_sub())