Re: Help with Phix structures
- Posted by petelomax Jan 07, 2021
- 738 views
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