On Jun 27, 2005, at 8:07 PM, Sisyphus wrote:
You can also 'printf("%d\n", SvREFCNT(sv));' to view the reference count
from within the C function. I've made use of that from time to time
(particularly wrt operator overloading, where I'm often not sure just what
the count is).

There's been some weirdness in how the reference counts behave when I've created SV*'s from within C. I couldn't really figure it out. I worked around it in the particular section by passing an extra argument from perl to use for output, so that the C function went from returning an SV to void.

There is no generic C debugger, and hence no generic methods of C
debugging - except for using printf() statements.

As an addendum to my previous post: the Perl debugger just froze up on encountering the segfault, so it wasn't any help. No surprise, really.

Heh ... I've only just now seen Eric's post. Like him, the main reason I didn't post was that I didn't feel qualified. I actually did write a reply
to your initial post, but then thought "naaaaaaaaaa ...". Sorry if my
timidity meant extra work for you :-)

I'll considering suing you for every penny our non-existent support contract entitles me to.

Thanks for the help,

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/

Reply via email to