[Go] Fix "in" typemap for char *&.
This commit is contained in:
parent
223c2a4835
commit
9cd3e28c4e
1 changed files with 5 additions and 4 deletions
|
|
@ -441,11 +441,12 @@
|
|||
$1[$input.n] = '\0';
|
||||
%}
|
||||
|
||||
%typemap(in) char *&
|
||||
%typemap(in) char *& (char *temp)
|
||||
%{
|
||||
$1 = ($1_ltype)malloc($input.n + 1);
|
||||
memcpy($1, $input.p, $input.n);
|
||||
$1[$input.n] = '\0';
|
||||
temp = (char *)malloc($input.n + 1);
|
||||
memcpy(temp, $input.p, $input.n);
|
||||
temp[$input.n] = '\0';
|
||||
$1 = ($1_ltype)&temp;
|
||||
%}
|
||||
|
||||
%typemap(freearg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue