On Sun, Sep 07, 2003 at 02:29:16PM +0100 Nicholas Clark wrote:

> On Sun, Sep 07, 2003 at 09:49:32AM +0200, Tassilo von Parseval wrote:
> 
> > I have a very basic C function that triggers a Perl callback:
> > 
> >     SV * call_Pslice (const char *func) {
> >         SV *res;
> > 
> >         dSP;
> >         ENTER;
> >         SAVETMPS;
> >         PUTBACK;
> > 
> >         (void)call_pv(func, G_SCALAR);
> 
> I don't fully understand all the perl calling conventions and macros, but
> given that you've not manipulated the perl stack before this call_pv,
> do you really need to PUTBACK? Your local stack pointer will be the same
> as the global stack pointer, so isn't it always a no-op?

It probably is when I'm stupid enough to forget the prior PUSHMARK, as
Jan pointed out. :-)

Well, one day I may perhaps understand the Perl stacks. I've been using
them so often over the last months and yet I never quite know what I
am doing. *sigh*

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval

Reply via email to