diff options
Diffstat (limited to 'Lib/go/go.swg')
-rw-r--r-- | Lib/go/go.swg | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/go/go.swg b/Lib/go/go.swg index 53b653f7c..c225ed9ad 100644 --- a/Lib/go/go.swg +++ b/Lib/go/go.swg @@ -341,8 +341,6 @@ %typemap(directorout) SWIGTYPE * %{ $result = *($&1_ltype)&$input; %} -%apply SWIGTYPE * { SWIGTYPE *const } - /* Pointer references. */ %typemap(gotype) SWIGTYPE *const& @@ -382,6 +380,11 @@ %typemap(directorout) SWIGTYPE & %{ *($&1_ltype)&$result = $input; %} +%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE *const& +%{ static $*1_ltype swig_temp; + swig_temp = *($1_ltype)&$input; + $result = &swig_temp; %} + %typemap(gotype) SWIGTYPE && %{$gotypename%} @@ -692,6 +695,10 @@ SWIGTYPE (CLASS::*) "" +%apply SWIGTYPE * { SWIGTYPE *const } +%apply SWIGTYPE (CLASS::*) { SWIGTYPE (CLASS::*const) } +%apply SWIGTYPE & { SWIGTYPE (CLASS::*const&) } + /* Go keywords. */ %include <gokw.swg> |