in reply to sv_derived_from gives a confsing result
A demo:warn("ST(0) is of type %s\n", HvNAME(SvSTASH(SvRV(ST(0)))));
Cheers,use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'EOC'; void foo(SV * x) { dXSARGS; if (sv_isobject(ST(0))) warn("ST(0) is of type %s\n", HvNAME(SvSTASH(SvRV(ST(0))))); else warn("Not an object\n"); XSRETURN(0); } EOC use Math::BigInt; my $obj = Math::BigInt->new(17); foo($obj);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sv_derived_from gives a confsing result
by geoffleach (Scribe) on Mar 29, 2011 at 05:08 UTC | |
by ikegami (Patriarch) on Mar 29, 2011 at 08:52 UTC | |
by syphilis (Archbishop) on Mar 29, 2011 at 10:43 UTC |