in reply to Help needed for XS on Perl v5.8.3
SvROK (scalar value reference OK/true) will tell you if your SV is a reference; not whether is simply exists - in this case, the value returned by ST(1), which should be the second value off the stack.
You might want to look at the actually type of reference SvROK thinks is coming back from the ST(1) call.
That can be done with:
Take a look in sv.h for specifics on the meaning of the individual return value./* if SvROK(ST(1) is true, i.e. it's a reference */ printf("\nDEBUG: Type is %d\n",SvTYPE(SvRV(ST(1)));
See also: perlguts, perlxs, perlxstut
Hope that helped,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help needed for XS on Perl v5.8.3
by pijush (Scribe) on Oct 05, 2004 at 09:47 UTC |