dSP;
ENTER;
SAVETMPS;
- PUSHMARK(sp);
- EXTEND(sp,2);
+ PUSHMARK(SP);
+ EXTEND(SP,2);
PUSHs(mg->mg_obj);
PUSHs(sv_2mortal(newSViv(key+1)));
PUTBACK;
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHMARK(sp);
- EXTEND(sp,2);
+ PUSHMARK(SP);
+ EXTEND(SP,2);
PUSHs(mg->mg_obj);
PUSHs(val);
PUTBACK;
croak(no_modify);
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(mg->mg_obj);
PUTBACK;
ENTER;
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHMARK(sp);
- EXTEND(sp,1+num);
+ PUSHMARK(SP);
+ EXTEND(SP,1+num);
PUSHs(mg->mg_obj);
while (num-- > 0) {
PUSHs(&sv_undef);
croak(no_modify);
if (SvRMAGICAL(av) && (mg = mg_find((SV*)av,'P'))) {
dSP;
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(mg->mg_obj);
PUTBACK;
ENTER;
dSP;
ENTER;
SAVETMPS;
- PUSHMARK(sp);
- EXTEND(sp,2);
+ PUSHMARK(SP);
+ EXTEND(SP,2);
PUSHs(mg->mg_obj);
PUSHs(sv_2mortal(newSViv(fill+1)));
PUTBACK;
GV* tmpgv;
if (op->op_flags & OPf_REF) {
- EXTEND(sp,1);
+ EXTEND(SP,1);
tmpgv = cGVOP->op_gv;
do_fstat:
io = GvIO(tmpgv);
djSP;
SV *sv;
if (op->op_flags & OPf_REF) {
- EXTEND(sp,1);
+ EXTEND(SP,1);
if (cGVOP->op_gv == defgv) {
if (laststype != OP_LSTAT)
croak("The stat preceding -l _ wasn't an lstat");
}
/* Guess how much room we need. hv_max may be a few too many. Oh well. */
- EXTEND(sp, HvMAX(hv) * (dokeys + dovalues));
+ EXTEND(SP, HvMAX(hv) * (dokeys + dovalues));
PUTBACK; /* hv_iternext and hv_iterval might clobber stack_sp */
while (entry = realhv ? hv_iternext(hv) : avhv_iternext((AV*)hv)) {
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
- EXTEND(sp,2) ;
+ PUSHMARK(SP) ;
+ EXTEND(SP,2) ;
PUSHs(sv_2mortal(newSVpv(data1,key1->size)));
PUSHs(sv_2mortal(newSVpv(data2,key2->size)));
PUTBACK ;
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
- EXTEND(sp,2) ;
+ PUSHMARK(SP) ;
+ EXTEND(SP,2) ;
PUSHs(sv_2mortal(newSVpv(data1,key1->size)));
PUSHs(sv_2mortal(newSVpv(data2,key2->size)));
PUTBACK ;
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSVpv((char*)data,size)));
PUTBACK ;
if (dld_undefined_sym_count) {
int x;
char **undef_syms = dld_list_undefined_sym();
- EXTEND(sp, dld_undefined_sym_count);
+ EXTEND(SP, dld_undefined_sym_count);
for (x=0; x < dld_undefined_sym_count; x++)
PUSHs(sv_2mortal(newSVpv(undef_syms[x]+1, 0)));
free(undef_syms);
sv_free((SV*)GvHV(gv));
GvHV(gv) = (HV*)SvREFCNT_inc(defstash);
- PUSHMARK(sp);
+ PUSHMARK(SP);
perl_call_sv(codesv, GIMME|G_EVAL|G_KEEPERR); /* use callers context */
SPAGAIN; /* for the PUTBACK added by xsubpp */
LEAVE;
PPCODE:
int fds[2];
if (pipe(fds) != -1) {
- EXTEND(sp,2);
+ EXTEND(SP,2);
PUSHs(sv_2mortal(newSViv(fds[0])));
PUSHs(sv_2mortal(newSViv(fds[1])));
}
#ifdef HAS_UNAME
struct utsname buf;
if (uname(&buf) >= 0) {
- EXTEND(sp, 5);
+ EXTEND(SP, 5);
PUSHs(sv_2mortal(newSVpv(buf.sysname, 0)));
PUSHs(sv_2mortal(newSVpv(buf.nodename, 0)));
PUSHs(sv_2mortal(newSVpv(buf.release, 0)));
num = strtod(str, &unparsed);
PUSHs(sv_2mortal(newSVnv(num)));
if (GIMME == G_ARRAY) {
- EXTEND(sp, 1);
+ EXTEND(SP, 1);
if (unparsed)
PUSHs(sv_2mortal(newSViv(strlen(unparsed))));
else
else
PUSHs(sv_2mortal(newSVnv((double)num)));
if (GIMME == G_ARRAY) {
- EXTEND(sp, 1);
+ EXTEND(SP, 1);
if (unparsed)
PUSHs(sv_2mortal(newSViv(strlen(unparsed))));
else
else
PUSHs(sv_2mortal(newSVnv((double)num)));
if (GIMME == G_ARRAY) {
- EXTEND(sp, 1);
+ EXTEND(SP, 1);
if (unparsed)
PUSHs(sv_2mortal(newSViv(strlen(unparsed))));
else
struct tms tms;
clock_t realtime;
realtime = times( &tms );
- EXTEND(sp,5);
+ EXTEND(SP,5);
PUSHs( sv_2mortal( newSViv( (IV) realtime ) ) );
PUSHs( sv_2mortal( newSViv( (IV) tms.tms_utime ) ) );
PUSHs( sv_2mortal( newSViv( (IV) tms.tms_stime ) ) );
void
tzname()
PPCODE:
- EXTEND(sp,2);
+ EXTEND(SP,2);
PUSHs(sv_2mortal(newSVpv(tzname[0],strlen(tzname[0]))));
PUSHs(sv_2mortal(newSVpv(tzname[1],strlen(tzname[1]))));
port = ntohs(addr.sin_port);
ip_address = addr.sin_addr;
- EXTEND(sp, 2);
+ EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv((IV) port)));
PUSHs(sv_2mortal(newSVpv((char *)&ip_address,sizeof ip_address)));
}
PUTBACK;
perl_call_sv(sv, G_ARRAY|G_EVAL);
SPAGAIN;
- retval = sp - (stack_base + oldmark);
- sp = stack_base + oldmark + 1;
+ retval = SP - (stack_base + oldmark);
+ SP = stack_base + oldmark + 1;
if (SvCUR(thr->errsv)) {
MUTEX_LOCK(&thr->mutex);
thr->flags |= THRf_DID_DIE;
DEBUG_L(STMT_START {
for (i = 1; i <= retval; i++) {
PerlIO_printf(PerlIO_stderr(), "%p return[%d] = %s\n",
- thr, i, SvPEEK(sp[i - 1]));
+ thr, i, SvPEEK(SP[i - 1]));
}
} STMT_END);
av_store(av, 0, &sv_yes);
- for (i = 1; i <= retval; i++, sp++)
- sv_setsv(*av_fetch(av, i, TRUE), SvREFCNT_inc(*sp));
+ for (i = 1; i <= retval; i++, SP++)
+ sv_setsv(*av_fetch(av, i, TRUE), SvREFCNT_inc(*SP));
}
finishoff:
"%p: newthread (%p), tid is %u, preparing stack\n",
savethread, thr, thr->tid));
/* The following pushes the arg list and startsv onto the *new* stack */
- PUSHMARK(sp);
+ PUSHMARK(SP);
/* Could easily speed up the following greatly */
for (i = 0; i <= AvFILL(initargs); i++)
XPUSHs(SvREFCNT_inc(*av_fetch(initargs, i, FALSE)));
/* Truncate any unneeded slots in av */
av_fill(av, n - 1);
/* Finally, push all the new objects onto the stack and drop av */
- EXTEND(sp, n);
+ EXTEND(SP, n);
for (svp = AvARRAY(av); n > 0; n--, svp++)
PUSHs(*svp);
(void)sv_2mortal((SV*)av);
PUTBACK;
pp_pushmark(ARGS);
- EXTEND(sp, notfound + 5);
+ EXTEND(SP, notfound + 5);
PUSHs(lr>0? right: left);
PUSHs(lr>0? left: right);
PUSHs( lr > 0 ? &sv_yes : ( assign ? &sv_undef : &sv_no ));
{
dSP;
- PUSHMARK(sp);
- EXTEND(sp, n);
+ PUSHMARK(SP);
+ EXTEND(SP, n);
PUSHs(mg->mg_obj);
if (n > 1) {
if (mg->mg_ptr) {
{
dSP;
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(mg->mg_obj);
PUTBACK;
ENTER;
ENTER;
SAVETMPS;
- PUSHMARK(sp);
- EXTEND(sp, 2);
+ PUSHMARK(SP);
+ EXTEND(SP, 2);
PUSHs(mg->mg_obj);
if (SvOK(key))
PUSHs(key);
sv = sv_newmortal();
sv_setpv(sv,sig_name[sig]);
}
- PUSHMARK(sp);
+ PUSHMARK(SP);
PUSHs(sv);
PUTBACK;
CV *cv = perl_get_cv("DB::postponed", FALSE);
if (cv) {
dSP;
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs((SV*)compiling.cop_filegv);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
if (HvFILL(hv) > 0 && hv_exists(hv, SvPVX(tmpstr), SvCUR(tmpstr))
&& (cv = GvCV(db_postponed))) {
dSP;
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(tmpstr);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
ENTER;
SAVETMPS;
- PUSHMARK(sp);
+ PUSHMARK(SP);
#if 0
if (!my_perl) {
{
int i;
ULONG rc;
- EXTEND(sp, items);
+ EXTEND(SP, items);
needvars(items);
if (trace)
fprintf(stderr, "REXXCALL::_fetch");
rc = RexxVariablePool(&sv);
} while (!rc && memcmp(stem, sv.shvname.strptr, len) != 0);
if (!rc) {
- EXTEND(sp, 2);
+ EXTEND(SP, 2);
/* returned lengths appear to be swapped */
/* but beware of "future bug fixes" */
namelen = sv.shvname.strlength; /* should be */
{
dSP;
- PUSHMARK(sp);
+ PUSHMARK(SP);
if (argv) {
while (*argv) {
XPUSHs(sv_2mortal(newSVpv(*argv,0)));
/* See G_* flags in cop.h */
{
- dTHR;
+ dSP;
LOGOP myop; /* fake syntax tree node */
- SV** sp = stack_sp;
I32 oldmark;
I32 retval;
I32 oldscope;
/* See G_* flags in cop.h */
{
- dTHR;
+ dSP;
UNOP myop; /* fake syntax tree node */
- SV** sp = stack_sp;
- I32 oldmark = sp - stack_base;
+ I32 oldmark = SP - stack_base;
I32 retval;
I32 oldscope;
dJMPENV;
dSP;
SV* sv = newSVpv(p, 0);
- PUSHMARK(sp);
+ PUSHMARK(SP);
perl_eval_sv(sv, G_SCALAR);
SvREFCNT_dec(sv);
void
Call_fred()
CODE:
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
perl_call_pv("fred", G_DISCARD|G_NOARGS) ;
fprintf(stderr, "back in Call_fred\n") ;
void
Call_fred()
CODE:
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
perl_call_pv("fred", G_EVAL|G_DISCARD|G_NOARGS) ;
fprintf(stderr, "back in Call_fred\n") ;
{
dSP ;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
perl_call_pv("PrintUID", G_DISCARD|G_NOARGS) ;
}
=item 1.
-Ignore C<dSP> and C<PUSHMARK(sp)> for now. They will be discussed in
+Ignore C<dSP> and C<PUSHMARK(SP)> for now. They will be discussed in
the next example.
=item 2.
{
dSP ;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSVpv(a, 0)));
XPUSHs(sv_2mortal(newSViv(b)));
PUTBACK ;
Parameters are passed to the Perl subroutine using the Perl stack.
This is the purpose of the code beginning with the line C<dSP> and
-ending with the line C<PUTBACK>.
-
+ending with the line C<PUTBACK>. The <dSP> declares a local copy
+of the stack pointer. This local copy should B<always> be accessed
+as C<SP>.
=item 2.
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSViv(a)));
XPUSHs(sv_2mortal(newSViv(b)));
PUTBACK ;
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSViv(a)));
XPUSHs(sv_2mortal(newSViv(b)));
PUTBACK ;
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSViv(a)));
XPUSHs(sv_2mortal(newSViv(b)));
PUTBACK ;
sva = sv_2mortal(newSViv(a)) ;
svb = sv_2mortal(newSViv(b)) ;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sva);
XPUSHs(svb);
PUTBACK ;
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSViv(a)));
XPUSHs(sv_2mortal(newSViv(b)));
PUTBACK ;
CallSubPV(name)
char * name
CODE:
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
perl_call_pv(name, G_DISCARD|G_NOARGS) ;
That is fine as far as it goes. The thing is, the Perl subroutine
CallSubSV(name)
SV * name
CODE:
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
perl_call_sv(name, G_DISCARD|G_NOARGS) ;
Because we are using an SV to call I<fred> the following can all be used
void
CallSavedSub1()
CODE:
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
perl_call_sv(rememberSub, G_DISCARD|G_NOARGS) ;
The reason this is wrong is that by the time you come to use the
void
CallSavedSub2()
CODE:
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
perl_call_sv(keepSub, G_DISCARD|G_NOARGS) ;
To avoid creating a new SV every time C<SaveSub2> is called,
char * method
int index
CODE:
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(ref);
XPUSHs(sv_2mortal(newSViv(index))) ;
PUTBACK;
char * class
char * method
CODE:
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(sv_2mortal(newSVpv(class, 0))) ;
PUTBACK;
{
dSP ;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
/* Call the Perl sub to process the callback */
perl_call_sv(callback, G_DISCARD) ;
if (sv == (SV**)NULL)
croak("Internal error...\n") ;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSViv(fh))) ;
XPUSHs(sv_2mortal(newSVpv(buffer, 0))) ;
PUTBACK ;
{
dSP ;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSVpv(buffer, 0))) ;
PUTBACK ;
ENTER ;
SAVETMPS;
- PUSHMARK(sp) ;
+ PUSHMARK(SP) ;
XPUSHs(sv_2mortal(newSViv(a)));
XPUSHs(sv_2mortal(newSViv(b)));
PUTBACK ;
count = perl_call_pv("AddSubtract", G_ARRAY);
SPAGAIN ;
- sp -= count ;
- ax = (sp - stack_base) + 1 ;
+ SP -= count ;
+ ax = (SP - stack_base) + 1 ;
if (count != 2)
croak("Big trouble\n") ;
The code
SPAGAIN ;
- sp -= count ;
- ax = (sp - stack_base) + 1 ;
+ SP -= count ;
+ ax = (SP - stack_base) + 1 ;
sets the stack up so that we can use the C<ST> macro.
dSP;
SV* retval;
- PUSHMARK(sp);
+ PUSHMARK(SP);
perl_eval_sv(sv, G_SCALAR);
SPAGAIN;
dSP; /* initialize stack pointer */
ENTER; /* everything created after here */
SAVETMPS; /* ...is a temporary variable. */
- PUSHMARK(sp); /* remember the stack pointer */
+ PUSHMARK(SP); /* remember the stack pointer */
XPUSHs(sv_2mortal(newSViv(a))); /* push the base onto the stack */
XPUSHs(sv_2mortal(newSViv(b))); /* push the exponent onto stack */
PUTBACK; /* make local stack pointer global */
To handle this situation, the PPCODE directive is used and the stack is
extended using the macro:
- EXTEND(sp, num);
+ EXTEND(SP, num);
-where C<sp> is the stack pointer, and C<num> is the number of elements the
-stack should be extended by.
+where C<SP> is the macro that represents the local copy of the stack pointer,
+and C<num> is the number of elements the stack should be extended by.
Now that there is room on the stack, values can be pushed on it using the
macros to push IVs, doubles, strings, and SV pointers respectively:
functions:
dSP
+ SP
PUSHMARK()
PUTBACK
SPAGAIN
=item dSP
-Declares a stack pointer variable, C<sp>, for the XSUB. See C<SP>.
+Declares a local copy of perl's stack pointer for the XSUB, available via
+the C<SP> macro. See C<SP>.
=item dXSARGS
bool_t status;
PPCODE:
status = rpcb_gettime( host, &timep );
- EXTEND(sp, 2);
+ EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(status)));
PUSHs(sv_2mortal(newSViv(timep)));
The EXTEND() macro is used to make room on the argument
stack for 2 return values. The PPCODE: directive causes the
-B<xsubpp> compiler to create a stack pointer called C<sp>, and it
+B<xsubpp> compiler to create a stack pointer available as C<SP>, and it
is this pointer which is being used in the EXTEND() macro.
The values are then pushed onto the stack with the PUSHs()
macro.
if (SvTYPE(av) == SVt_PVAV) {
if (lval && op->op_private & OPpLVAL_INTRO) {
I32 max = -1;
- for (svp = mark + 1; svp <= sp; svp++) {
+ for (svp = MARK + 1; svp <= SP; svp++) {
elem = SvIVx(*svp);
if (elem > max)
max = elem;
{
djSP;
dPOPPOPssrl;
- SV **oldsp = sp;
+ SV **oldsp = SP;
I32 gimme = GIMME_V;
SV *sv;
STRLEN llen;
checksum = 0;
}
}
- if (sp == oldsp && gimme == G_SCALAR)
+ if (SP == oldsp && gimme == G_SCALAR)
PUSHs(&sv_undef);
RETURN;
}
{
djSP;
#ifdef USE_THREADS
- EXTEND(sp, 1);
+ EXTEND(SP, 1);
if (op->op_private & OPpLVAL_INTRO)
PUSHs(*save_threadsv(op->op_targ));
else
djSP;
SV *src;
- if (stack_base + *markstack_ptr == sp) {
+ if (stack_base + *markstack_ptr == SP) {
(void)POPMARK;
if (GIMME_V == G_SCALAR)
XPUSHs(&sv_no);
PP(pp_mapwhile)
{
djSP;
- I32 diff = (sp - stack_base) - *markstack_ptr;
+ I32 diff = (SP - stack_base) - *markstack_ptr;
I32 count;
I32 shift;
SV** src;
if (diff) {
if (diff > markstack_ptr[-1] - markstack_ptr[-2]) {
shift = diff - (markstack_ptr[-1] - markstack_ptr[-2]);
- count = (sp - stack_base) - markstack_ptr[-1] + 2;
+ count = (SP - stack_base) - markstack_ptr[-1] + 2;
- EXTEND(sp,shift);
- src = sp;
- dst = (sp += shift);
+ EXTEND(SP,shift);
+ src = SP;
+ dst = (SP += shift);
markstack_ptr[-1] += shift;
*markstack_ptr += shift;
while (--count)
}
else {
sv_setiv(targ, 0);
- sp--;
+ SP--;
RETURNOP(((CONDOP*)cUNOP->op_first)->op_false);
}
}
if (op->op_private || SvIV(DBsingle) || SvIV(DBsignal) || SvIV(DBtrace))
{
- SV **sp;
+ djSP;
register CV *cv;
register PERL_CONTEXT *cx;
I32 gimme = G_ARRAY;
SAVESTACK_POS();
debug = 0;
hasargs = 0;
- sp = stack_sp;
+ SPAGAIN;
push_return(op->op_next);
- PUSHBLOCK(cx, CXt_SUB, sp);
+ PUSHBLOCK(cx, CXt_SUB, SP);
PUSHSUB(cx);
CvDEPTH(cv)++;
(void)SvREFCNT_inc(cv);
cx->blk_loop.iterary = (AV*)SvREFCNT_inc(POPs);
else {
cx->blk_loop.iterary = curstack;
- AvFILLp(curstack) = sp - stack_base;
+ AvFILLp(curstack) = SP - stack_base;
cx->blk_loop.iterix = MARK - stack_base;
}
if (CvXSUB(cv)) {
if (CvOLDSTYLE(cv)) {
I32 (*fp3)_((int,int,int));
- while (sp > mark) {
- sp[1] = sp[0];
- sp--;
+ while (SP > mark) {
+ SP[1] = SP[0];
+ SP--;
}
fp3 = (I32(*)_((int,int,int)))CvXSUB(cv);
items = (*fp3)(CvXSUBANY(cv).any_i32,
mark - stack_base + 1,
items);
- sp = stack_base + items;
+ SP = stack_base + items;
}
else {
stack_sp--; /* There is no cv arg. */
items = AvFILLp(av) + 1;
if (items) {
/* Mark is at the end of the stack. */
- EXTEND(sp, items);
- Copy(AvARRAY(av), sp + 1, items, SV*);
- sp += items;
+ EXTEND(SP, items);
+ Copy(AvARRAY(av), SP + 1, items, SV*);
+ SP += items;
PUTBACK ;
}
}
CV *cv = perl_get_cv("DB::postponed", FALSE);
if (cv) {
dSP;
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs((SV*)compiling.cop_filegv);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
lex_end();
if (optype == OP_REQUIRE &&
- !(gimme == G_SCALAR ? SvTRUE(*sp) : sp > newsp))
+ !(gimme == G_SCALAR ? SvTRUE(*SP) : SP > newsp))
{
/* Unassume the success we assumed earlier. */
char *name = cx->blk_eval.old_name;
PP(pp_gvsv)
{
djSP;
- EXTEND(sp,1);
+ EXTEND(SP,1);
if (op->op_private & OPpLVAL_INTRO)
PUSHs(save_scalar(cGVOP->op_gv));
else
ENTER;
SAVETMPS;
- PUSHBLOCK(cx, CXt_BLOCK, sp);
+ PUSHBLOCK(cx, CXt_BLOCK, SP);
RETURN;
}
SV* sv;
AV* av;
- EXTEND(sp, 1);
+ EXTEND(SP, 1);
cx = &cxstack[cxstack_ix];
if (cx->cx_type != CXt_LOOP)
DIE("panic: pp_iter");
LEAVE; /* exit inner scope */
/* All done yet? */
- if (stack_base + *markstack_ptr > sp) {
+ if (stack_base + *markstack_ptr > SP) {
I32 items;
I32 gimme = GIMME_V;
dMARK;
register I32 items = SP - MARK;
/* We dont worry to copy from @_. */
- while (sp > mark) {
- sp[1] = sp[0];
- sp--;
+ while (SP > mark) {
+ SP[1] = SP[0];
+ SP--;
}
stack_sp = mark + 1;
fp3 = (I32(*)_((int,int,int)))CvXSUB(cv);
if (items) {
/* Mark is at the end of the stack. */
- EXTEND(sp, items);
- Copy(AvARRAY(av), sp + 1, items, SV*);
- sp += items;
+ EXTEND(SP, items);
+ Copy(AvARRAY(av), SP + 1, items, SV*);
+ SP += items;
PUTBACK ;
}
}
items = AvFILLp(av) + 1;
if (items) {
/* Mark is at the end of the stack. */
- EXTEND(sp, items);
- Copy(AvARRAY(av), sp + 1, items, SV*);
- sp += items;
+ EXTEND(SP, items);
+ Copy(AvARRAY(av), SP + 1, items, SV*);
+ SP += items;
PUTBACK ;
}
}
}
ENTER;
- PUSHMARK(sp);
+ PUSHMARK(SP);
- EXTEND(sp, 5);
+ EXTEND(SP, 5);
PUSHs(sv);
PUSHs(left);
if (SvIV(right))
SPAGAIN;
if (!sv_isobject(TOPs)) {
- sp--;
- PUSHMARK(sp);
+ SP--;
+ PUSHMARK(SP);
PUSHs(sv);
PUSHs(left);
PUSHs(sv_2mortal(newSViv(O_RDONLY)));
djSP;
#ifdef HAS_ENDHOSTENT
endhostent();
- EXTEND(sp,1);
+ EXTEND(SP,1);
RETPUSHYES;
#else
DIE(no_sock_func, "endhostent");
djSP;
#ifdef HAS_ENDNETENT
endnetent();
- EXTEND(sp,1);
+ EXTEND(SP,1);
RETPUSHYES;
#else
DIE(no_sock_func, "endnetent");
djSP;
#ifdef HAS_ENDPROTOENT
endprotoent();
- EXTEND(sp,1);
+ EXTEND(SP,1);
RETPUSHYES;
#else
DIE(no_sock_func, "endprotoent");
djSP;
#ifdef HAS_ENDSERVENT
endservent();
- EXTEND(sp,1);
+ EXTEND(SP,1);
RETPUSHYES;
#else
DIE(no_sock_func, "endservent");
SvREADONLY_on(msg);
SAVEFREESV(msg);
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
SvREADONLY_on(msg);
SAVEFREESV(msg);
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
SvREADONLY_on(msg);
SAVEFREESV(msg);
- PUSHMARK(sp);
+ PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);