Re: Help with Phix structures

new topic     » goto parent     » topic index » view thread      » older message » newer message

I would try this first:

include cffi.e 
constant idGtkTreeIter = define_struct(""" 

typedef struct GtkTreeIter {  
  int stamp;  
  ptr user_data;  
  ptr user_data2;  
  ptr user_data3;  
};  
""") 

atom pGtkTreeIter = allocate_struct(idGtkTreeIter) 

(I suppose we could update cffi.e to recognise gint and gpointer once we're sure what they are on 32/64 bit win/lnx)

Oh, silly me, this should also work:

struct GtkTreeIter 
""" 

typedef struct GtkTreeIter {  
  int stamp;  
  ptr user_data;  
  ptr user_data2;  
  ptr user_data3;  
};  
""" 

end struct 
GtkTreeIter gti = new() 

PS the blank lines are courtesy of euforum, not me
PPS sorry, I omitted typedef, now fixed

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu