Add rvalue reference typemaps

This commit is contained in:
William S Fulton 2013-01-24 19:24:52 +00:00
commit e87a51ed92

View file

@ -281,6 +281,21 @@ type _swig_memberptr *byte
%typemap(directorout) SWIGTYPE &
%{ *($&1_ltype)&$result = $input; %}
%typemap(gotype) SWIGTYPE &&
%{$gotypename%}
%typemap(in) SWIGTYPE &&
%{ $1 = *($&1_ltype)&$input; %}
%typemap(out) SWIGTYPE &&
%{ *($&1_ltype)&$result = $1; %}
%typemap(directorin) SWIGTYPE &&
%{ $input = ($1_ltype)&$1_name; %}
%typemap(directorout) SWIGTYPE &&
%{ *($&1_ltype)&$result = $input; %}
/* C arrays turn into Go pointers. If we know the length we can use a
slice. */
@ -398,7 +413,7 @@ type _swig_memberptr *byte
%typemap(throws) char *
%{ _swig_gopanic($1); %}
%typemap(throws) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [], SWIGTYPE [ANY]
%typemap(throws) SWIGTYPE, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE *, SWIGTYPE [], SWIGTYPE [ANY]
%{
(void)$1;
_swig_gopanic("C++ $1_type exception thrown");
@ -504,6 +519,7 @@ type _swig_memberptr *byte
SWIGTYPE,
SWIGTYPE *,
SWIGTYPE &,
SWIGTYPE &&,
SWIGTYPE *const&,
SWIGTYPE [],
SWIGTYPE (CLASS::*)