From 924508f06969d29692d1762cecf34a062431e1af Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sat, 7 Mar 1998 01:05:21 +0000 Subject: [win32] change all 'sp' to 'SP' in code and in the docs. Explicitly mention that local stack pointer should be called SP. This makes the API safer from source incompatibilities down the line. p4raw-id: //depot/win32/perl@795 --- ext/Thread/Thread.xs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ext/Thread') diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs index 3b49dbecb2..aea72f4a46 100644 --- a/ext/Thread/Thread.xs +++ b/ext/Thread/Thread.xs @@ -117,8 +117,8 @@ threadstart(void *arg) 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; @@ -131,12 +131,12 @@ threadstart(void *arg) 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: @@ -219,7 +219,7 @@ newthread (SV *startsv, AV *initargs, char *classname) "%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))); @@ -543,7 +543,7 @@ list(classname) /* 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); -- cgit v1.2.1