Hello, 

I have a C function that returns a unsigned char* that represents binary data. I noticed in the documentation that SWIG has a nice typemap to handle binary data as input to a C function, but what about when a C function returns binary data and its unsigned? Any ideas?

swig.i:

%apply (char *STRING, size_t LENGTH) { (const char data[], size_t len) }
%inline %{
void binaryChar1(const char data[], size_t len) {
  printf("len: %d data: ", len);
  for (size_t i=0; i<len; ++i)
    printf("%x ", data[i]);
  printf("\n");
}
%}

java:

byte[] data = "hi\0jk".getBytes();
example.binaryChar1(data);

Thanks!