/* pp.h
*
* 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_5005THREADS
#else
#define ARGS
#define dARGS
#endif /* USE_5005THREADS */
/*
=head1 Stack Manipulation Macros
=for apidoc AmU||SP
Stack pointer. This is usually handled by C<xsubpp>. See C<dSP> and
C<SPAGAIN>.
=for apidoc AmU||MARK
Stack marker variable for the XSUB. See C<dMARK>.
=for apidoc Ams||PUSHMARK
Opening bracket for arguments on a callback. See C<PUTBACK> and
L<perlcall>.
=for apidoc Ams||dSP
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>.
=for apidoc Ams||dORIGMARK
Saves the original stack mark for the XSUB. See C<ORIGMARK>.
=for apidoc AmU||ORIGMARK
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 */
markstack_grow(); \
*PL_markstack_ptr = (p) - PL_stack_base
/*
=for apidoc Ams||PUTBACK
Closing bracket for XSUB arguments. This is usually handled by C<xsubpp>.
See C<PUSHMARK> and L<perlcall> for other uses.
=for apidoc Amn|SV*|POPs
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.
=for apidoc Amn|IV|POPi
Pops an integer off the stack.
=for apidoc Amn|long|POPl
Pops a long off the stack.
=cut
*/
#ifdef HAS_QUAD
#endif
#ifdef HAS_QUAD
#endif
/* Go to some pains in the rare event that we must extend the stack. */
/*
=for apidoc Am|void|EXTEND|SP|int nitems
Used to extend the argument stack for an XSUB's return values. Once
used, guarantees that there is room for at least C<nitems> to be pushed
onto the stack.
=for apidoc Am|void|PUSHs|SV* sv
Push an SV onto the stack. The stack must have room for this element.
Does not handle 'set' magic. See C<XPUSHs>.
=for apidoc Am|void|PUSHp|char* str|STRLEN len
Push a string onto the stack. The stack must have room for this element.
The C<len> indicates the length of the string. Handles 'set' magic. See
C<XPUSHp>.
=for apidoc Am|void|PUSHn|NV nv
Push a double onto the stack. The stack must have room for this element.
Handles 'set' magic. See C<XPUSHn>.
=for apidoc Am|void|PUSHi|IV iv
Push an integer onto the stack. The stack must have room for this element.
Handles 'set' magic. See C<XPUSHi>.
=for apidoc Am|void|PUSHu|UV uv
Push an unsigned integer onto the stack. The stack must have room for this
element. See C<XPUSHu>.
=for apidoc Am|void|XPUSHs|SV* sv
Push an SV onto the stack, extending the stack if necessary. Does not
handle 'set' magic. See C<PUSHs>.
=for apidoc Am|void|XPUSHp|char* str|STRLEN len
Push a string onto the stack, extending the stack if necessary. The C<len>
indicates the length of the string. Handles 'set' magic. See
C<PUSHp>.
=for apidoc Am|void|XPUSHn|NV nv
Push a double onto the stack, extending the stack if necessary. Handles
'set' magic. See C<PUSHn>.
=for apidoc Am|void|XPUSHi|IV iv
Push an integer onto the stack, extending the stack if necessary. Handles
'set' magic. See C<PUSHi>.
=for apidoc Am|void|XPUSHu|UV uv
Push an unsigned integer onto the stack, extending the stack if necessary.
See C<PUSHu>.
=cut
*/
} } STMT_END
/* Same thing, but update mark register too. */
} } STMT_END
#ifdef HAS_QUAD
#endif
#define dPOPXnnrl_ul(X) \
#define dPOPXiirl_ul(X) \
/* See OPpTARGET_MY: */
#define SWITCHSTACK(f,t) \
STMT_START { \
PL_stack_base = AvARRAY(t); \
PL_curstack = t; \
} STMT_END
#define EXTEND_MORTAL(n) \
STMT_START { \
if (PL_tmps_ix + (n) >= PL_tmps_max) \
tmps_grow(n); \
} STMT_END
if (PL_amagic_generation) { \
right, \
(assign)? AMGf_assign: 0))) {\
SPAGAIN; \
} \
} STMT_END
if (PL_amagic_generation) { \
if(0) goto am_again; /* shut up unused warning */ \
am_again: \
} \
} STMT_END
{ dTARGETSTACKED; \
goto am_again; \
}
/* newSVsv does not behave as advertised, so we copy missing
* information by hand */
/* SV* ref causes confusion with the member variable
changed SV* ref to SV* tmpRef */
SvREFCNT_dec(tmpRef); \
} } STMT_END
/*
=for apidoc mU||LVRET
True if this op will be the return value of an lvalue subroutine
=cut */