in reply to simple XS
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: simple XS
by ikegami (Patriarch) on Mar 01, 2010 at 12:37 UTC | |
by chromatic (Archbishop) on Mar 01, 2010 at 18:14 UTC |