I'm not surprised you get a segfault. I'm surprised you don't get a compiler warning. Isn't this a big problem?
int get(self,index) SV* self int index
A Perl integer is also an SV with the IV flag set. Unless you (somehow) have a typemap set up to convert your SvIV to a C integer, I think you're letting C coerce the address of the pointer to an integer and trying to use that as the array index. That's a one-way ticket to segfault town.
In reply to Re: simple XS
by chromatic
in thread simple XS
by spx2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |