I have a c++ function returning an uint8_t* array like:

uint8_t* getData();

Swig maps this to a SWIGTYPE_p_unsigned_char. I would like a more friendly name. In my .i file I have simply included my h file containing the code above. I have tried %rename but it doesnt work:

%rename (SWIGTYPE_p_unsigned_char) u8_t;
%include "myhfile.h"

How do I force Swig to rename my type (or solve it some other way)?

/ Rolle