perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: interpreter context in xs
Date Fri, 12 Nov 2004 20:01:13 GMT
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",
>                    HvNAME(SvSTASH(SvRV(in))));
> 
> and not context. expand:
> 
> gdb> print *cv
> gdb> print *in
> 
> and descend further to see where the problem is.

> If you don't figure it out, send me the package and I'll look at it.

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.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message