in reply to mapping a C structure with perlXS

Can you show the XS code and the typemap so we have some idea where the error is?

Replies are listed 'Best First'.
Re^2: mapping a C structure with perlXS
by jeanba (Novice) on May 20, 2005 at 14:18 UTC
    yes excuse me , i forgot the most important... the xs file is like this (exactly) :
    #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include "test.h" typedef struct s_test Test; MODULE = Tests PACKAGE = Tests void my_function(ptr_struct) Test * ptr_struct
    and in thetypemap file i added the following line :
    Test * T_PTROBJ
    thank you very much
      Note that your s_test is a type:
      typedef struct { unsigned *char test;} s_test;
      not a struct (which is anonymous here). So you'd probably better:
      typedef s_test Test; /* Removed "struct" */
      and see if this fixes your problem.

      Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

      Don't fool yourself.
        i tried and i had the same message during the make step :
        assignment of an incompatible pointer type
        excuse me for my so bad english ....