On Sun, 07 Sep 2003 19:52:56 +0200, Tassilo von Parseval
<[EMAIL PROTECTED]> wrote:

>I was once more thinking about this PUSHMARK/PUSHBACK issue. perlapi.pod
>described them as "opening" and "closing" brackets for the arguments. If

I'm not aware of PUSHBACK, I assume you mean PUTBACK.  They are not
related "brackets".  PUSHMARK marks the beginning of a new stackframe on
the markstack.

PUTBACK is related to the local copy of the stack pointer SP (defined e.g.
by dSP).  PUTBACK copies the local variable back to PL_stack_sp.  The
opposite of it is SPAGAIN, which copies PL_stack_sp into SP.

You have to call PUTBACK after using the X?PUSH.() macros, before calling
perl_call_xxx().  You call SPAGAIN after it returns because it may have
modified the stack pointer.

Cheers,
-Jan

Reply via email to