Are arrays within structs handled? I have a C type declaration...

typedef struct {
    enum CXCursorKind kind;
    int xdata;
    const void *data[3];
} CXCursor;

which for the moment I've simplified the enum and defined...

  FFIExternalStructure subclass: #CXCursor
      instanceVariableNames: ''
      classVariableNames: ''
      package: 'Libclang'

  CXCursor class >> fieldsDesc
      "self rebuildFieldAccessors"
      ^ #(
            int kind;
            int xdata;
            void *data[3];
      )

an evaluated...
    CXCursor rebuildFieldAccessors

but it produces...  Error: Unable to resolve external type: [
So it seems arrays inside structs are currently not handled ?

Now I read the typedef as "data is an array of three pointers to
void",  so how likely is it for something like this to work...

  CXCursor class >> fieldsDesc
      "self rebuildFieldAccessors"
      ^ #(
            int kind;
            int xdata;
            void *data1;
            void *data2;
            void *data3;
      )

I'll experiment some more in the meantime.

cheers -ben

Reply via email to