Hello, I created my interface in c by using xs.
This work fine: transition_HF* init___ () PREINIT: transition_HF *trans ; CODE: trans = (transition_HF*) malloc (sizeof (transition_HF)) ; RETVAL = trans ; OUTPUT: RETVAL but if I make a push: like: XPUSHs (sv_2mortal (newRV ((SV*) (trans)))) ; or: XPUSHs (sv_2mortal (newRV (trans))) ; I always get an error like: is not of type transition_HFPtr when I try to access to this structure (in the first case, it works fine). I set typemap like: TYPEMAP transition_HF * T_PTROBJ What am I doing wrong ? Thank. -- --- ========================================================================== Patrick DUPRÉ | | Department of Chemistry | | Phone: (44)-(0)-1904-434384 The University of York | | Fax: (44)-(0)-1904-432516 Heslington | | York YO10 5DD United Kingdom | | email: patrick.du...@york.ac.uk ==========================================================================
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/