Reputation: 9827
I have a few C structures like below that are generated by SWIG into sample_struct_t.java since the C function declares it as sample_struct_t. What would I need to add to the SWIG interface file to generate the sample_struct_t structure as Sample.java?
typedef struct sample_struct_t_ {
char *sample;
uint8_t example;
ios_boolean remove;
} sample_struct_t;
Upvotes: 1
Views: 1404
Reputation: 88721
You need to use %rename
with the non-typedef
'd (i.e. original) name, before this is first seen:
%module test
%rename (Sample) sample_struct_t_;
typedef struct sample_struct_t_ {
char *sample;
uint8_t example;
ios_boolean remove;
} sample_struct_t;
Upvotes: 1