----- Original Message -----
From: "David Oswald"
I've also looked over the output from BUILD_NOISY as well
as the .xs file that a build creates.
Also take a look at the .c file that gets generated from the .xs file. After
all, it's that .c file that gets compiled, not the .xs file.
For example, in XS(XS_main__Parent2_do_another) I see:
/////////////////////////////////////////////
if (sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG)) {
THIS = (Parent2 *)SvIV((SV*)SvRV( ST(0) ));
}
/////////////////////////////////////////////
and I wonder what would happen if it should instead be looking at ST(1).
For debugging purposes Id' like to see that code become something like:
/////////////////////////////////////////////
if (sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG)) {
printf("OBJECT: %s\n", HvNAME(SvSTASH(SvRV(ST(0)))));
THIS = (Parent2 *)SvIV((SV*)SvRV( ST(0) ));
}
/////////////////////////////////////////////
but I don't know how to implement that change - possibly requires a hack to
ExtUtils::ParseXS.
Anyway, even if that code change is a stupid suggestion ... don't forget to
check the generated .c file !
Cheers,
Rob