diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-10-27 22:25:41 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-10-27 22:25:41 +0000 |
commit | d85c2f57f17d991a6ca78d3e1c9f3308a2bbb271 (patch) | |
tree | 8c9a359433cbb3488b0a848e99bd869c76295dfd /gnu/usr.bin/perl/pp.h | |
parent | 74cfb115ac810480c0000dc742b20383c1578bac (diff) |
Resolve conflicts, remove old files, merge local changes
Diffstat (limited to 'gnu/usr.bin/perl/pp.h')
-rw-r--r-- | gnu/usr.bin/perl/pp.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/gnu/usr.bin/perl/pp.h b/gnu/usr.bin/perl/pp.h index 10da9644924..9a909c81571 100644 --- a/gnu/usr.bin/perl/pp.h +++ b/gnu/usr.bin/perl/pp.h @@ -1,23 +1,25 @@ /* pp.h * - * Copyright (c) 1991-2001, Larry Wall + * Copyright (c) 1991-2002, 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) /* +=head1 Stack Manipulation Macros + =for apidoc AmU||SP Stack pointer. This is usually handled by C<xsubpp>. See C<dSP> and C<SPAGAIN>. @@ -33,6 +35,13 @@ L<perlcall>. Declares a local copy of perl's stack pointer for the XSUB, available via the C<SP> macro. See C<SP>. +=for apidoc ms||djSP + +Declare Just C<SP>. This is actually identical to C<dSP>, and declares +a local copy of perl's stack pointer, available via the C<SP> macro. +See C<SP>. (Available for backward source code compatibility with the +old (Perl 5.005) thread model.) + =for apidoc Ams||dMARK Declare a stack marker variable, C<mark>, for the XSUB. See C<MARK> and C<dORIGMARK>. @@ -46,8 +55,7 @@ The original stack mark for the XSUB. See C<dORIGMARK>. =for apidoc Ams||SPAGAIN Refetch the stack pointer. Used after a callback. See L<perlcall>. -=cut -*/ +=cut */ #undef SP /* Solaris 2.7 i386 has this in /usr/include/sys/reg.h */ #define SP sp @@ -94,7 +102,16 @@ See C<PUSHMARK> and L<perlcall> 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. @@ -116,6 +133,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 +145,8 @@ Pops a long off the stack. #endif #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 +346,7 @@ See C<PUSHu>. 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))) {\ |