blob: 86e0880ebbee1a7e204c2cbd6e7358e85fca3227 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
%module foolib
%{
static int foo( char **buf ) {
*buf = "string from c";
return 0;
}
%}
%typemap(in,numinputs=0) char **buf (char *temp) {
$1 = &temp;
}
%typemap(argout) char **buf {
swig_result = caml_list_append(swig_result,caml_val_string((char *)*$1));
}
int foo( char **buf );
|