results in the runtime error:print Audio::TagLib::ID3v2::Frame::size(1), "\n";
THIS is not of type Audio::TagLib::ID3v2::Frame
I realize that this is not exactly a full example. I'm trying to keep things simple:-)
The short of it is this. We're accessing an XS interface to the C++ library taglib.. The XS code is:
and the C code derived from this is:unsigned int TagLib::ID3v2::Frame::size() CODE: RETVAL = THIS->size(); OUTPUT: RETVAL
So I see where the error is coming from, the question is: how is Perl determining what the type of THIS is? As far as I can tell, the various objects all have the correct specifications back to the C++ code. Additionally, is there a perlapi that will say what it thinks the type of THIS is?... if (sv_isobject(ST(0)) && sv_derived_from(ST(0), "Audio::TagLib::ID3v2 +::Fram THIS = INT2PTR(TagLib::ID3v2::Frame *, SvIV((SV *)SvRV(ST(0))) +); else Perl_croak(aTHX_ "THIS is not of type Audio::TagLib::ID3v2::Fr +ame");
Thanks.
In reply to sv_derived_from gives a confsing result by geoffleach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |