in reply to Re^2: XSUBs with variable input types
in thread XSUBs with variable input types

Please read the section "Perl Objects And C Structures" in perlxs (ignore the part about "Ptr" getting appended). You probably want your typemap to say:
Foo T_PTROBJ Bar T_PTROBJ Baz T_PTROBJ
and then have typedefs in your XS code to map these to your C level types. The perl level object hierarchy you define in the normal way in .pm files with e.g. things like:
package Bar; ... use base qw(Foo); ...
(and supposedly Foo.pm does the dynaload)

Again, this last is not necessarily a good idea unless it's ok to call Foo functions on Bar objects for XS methods that exist in Foo but not in Bar (they will get called through inheritance if you apply that method to a Bar object)

Replies are listed 'Best First'.
Re^4: XSUBs with variable input types
by crenz (Priest) on Oct 26, 2004 at 02:00 UTC

    Thanks a lot, that works exactly as expected! I use @ISA for inheritance, but apart from that adopted your solution.