Fix Go support for enums to work correctly when Go int type is 64 bits.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13875 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b1ee062d2a
commit
786d883d45
2 changed files with 18 additions and 1 deletions
|
|
@ -366,7 +366,7 @@
|
|||
%{ $1 = ($1_ltype)$input; %}
|
||||
|
||||
%typemap(out) enum SWIGTYPE
|
||||
%{ $result = $1; %}
|
||||
%{ $result = (intgo)$1; %}
|
||||
|
||||
%typemap(directorin) enum SWIGTYPE
|
||||
%{ $input = ($1_ltype)$1; %}
|
||||
|
|
@ -374,6 +374,18 @@
|
|||
%typemap(directorout) enum SWIGTYPE
|
||||
%{ $result = ($1_ltype)$input; %}
|
||||
|
||||
%typemap(directorin) enum SWIGTYPE & (intgo e)
|
||||
%{
|
||||
e = (intgo)$1;
|
||||
$input = &e;
|
||||
%}
|
||||
|
||||
%typemap(directorout) enum SWIGTYPE &
|
||||
%{
|
||||
$*1_ltype f = ($*1_ltype)*$input;
|
||||
$result = ($1_ltype)&f;
|
||||
%}
|
||||
|
||||
/* Arbitrary type. This is a type passed by value in the C/C++ code.
|
||||
We convert it to a pointer for the Go code. Note that all basic
|
||||
types are explicitly handled above. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue