X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp.h;h=1d9a9339cc5b00c294702a688abd6ed30054e46c;hb=3226bbec67a495e52de65a4d7ece19d720e5f94d;hp=5e531dada63caf69f4cb5dfd76c2291cff304518;hpb=56370e9f11602e6539affc6db0d7eabafd518796;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp.h b/pp.h index 5e531da..1d9a933 100644 --- a/pp.h +++ b/pp.h @@ -1,19 +1,19 @@ /* pp.h * - * Copyright (c) 1991-2000, Larry Wall + * Copyright (c) 1991-2001, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * */ -#ifdef USE_THREADS +#ifdef USE_5005THREADS #define ARGS thr #define dARGS struct perl_thread *thr; #else #define ARGS #define dARGS -#endif /* USE_THREADS */ +#endif /* USE_5005THREADS */ #define PP(s) OP * Perl_##s(pTHX) @@ -33,6 +33,13 @@ L. Declares a local copy of perl's stack pointer for the XSUB, available via the C macro. See C. +=for apidoc ms||djSP + +Declare Just C. This is actually identical to C, and declares +a local copy of perl's stack pointer, available via the C macro. +See C. (Available for backward source code compatibility with the +old (Perl 5.005) thread model.) + =for apidoc Ams||dMARK Declare a stack marker variable, C, for the XSUB. See C and C. @@ -46,9 +53,9 @@ The original stack mark for the XSUB. See C. =for apidoc Ams||SPAGAIN Refetch the stack pointer. Used after a callback. See L. -=cut -*/ +=cut */ +#undef SP /* Solaris 2.7 i386 has this in /usr/include/sys/reg.h */ #define SP sp #define MARK mark #define TARG targ @@ -60,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 @@ -93,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. @@ -115,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)) @@ -127,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)) @@ -326,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))) {\ @@ -374,3 +393,10 @@ See C. SvREFCNT_dec(tmpRef); \ SvRV(rv)=AMG_CALLun(rv,copy); \ } } STMT_END + +/* +=for apidoc mU||LVRET +True if this op will be the return value of an lvalue subroutine + +=cut */ +#define LVRET ((PL_op->op_private & OPpMAYBE_LVSUB) && is_lvalue_sub())