Re: interpreter context in xs

2004-11-14 Thread Geoffrey Young
> It was easy to reproduce and it's now fixed in cvs: > > - HvNAME(SvSTASH(SvRV(in; > + (SvRV(in) && SvSTASH(SvRV(in))) > + ? HvNAME(SvSTASH(SvRV(in))) > + : "unknown"); > > and added the relevant tests.

Re: interpreter context in xs

2004-11-12 Thread Stas Bekman
Stas Bekman wrote: [...] Your trace shows that you have the context just fine. Most likely it croaks in one of the macros: Perl_croak(aTHX_ "method `%s' invoked by a `%s' object with no `r' key!", cv ? GvNAME(CvGV(cv)) : "unknown",

Re: interpreter context in xs

2004-11-11 Thread Stas Bekman
Geoffrey Young wrote: hi all (stas in particular :) I have this bit of XS in Apache::SSLLookup SV * new(self, r) SV * self Apache::RequestRec r INIT: MP_dTHX; /* interpreter selection */ why do you need that? You already have the context, it's pTHX this turns into the C c

interpreter context in xs

2004-11-11 Thread Geoffrey Young
hi all (stas in particular :) I have this bit of XS in Apache::SSLLookup SV * new(self, r) SV * self Apache::RequestRec r INIT: MP_dTHX; /* interpreter selection */ this turns into the C code XS(XS_Apache__SSLLookup_new) { dXSARGS; if (items != 2)