X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/7dca457a331b97453e1d930c080996ddea87ffa7..5129fff43c4fe08cb17d8789b8a5c778039a25c3:/pp.h diff --git a/pp.h b/pp.h index 674f6c6..700d91a 100644 --- a/pp.h +++ b/pp.h @@ -1,23 +1,18 @@ /* pp.h * - * Copyright (c) 1991-2001, Larry Wall + * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, + * 2000, 2001, by Larry Wall and others * * 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 -#define ARGS thr -#define dARGS struct perl_thread *thr; -#else -#define ARGS -#define dARGS -#endif /* USE_THREADS */ - #define PP(s) OP * Perl_##s(pTHX) /* +=head1 Stack Manipulation Macros + =for apidoc AmU||SP Stack pointer. This is usually handled by C. See C and C. @@ -55,6 +50,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 +62,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 +95,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 +126,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)) @@ -333,6 +339,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))) {\