[D] Support for C++ references to primitive types.
I am not sure why these typemaps were missing before since I included code for this in the C++ part of the feature, but please let me know if I missed some case where this could break generated code. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12406 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
85ed05c241
commit
160ee9c937
1 changed files with 12 additions and 5 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
%typemap(ctype) SWIGTYPE & "void *"
|
||||
%typemap(imtype) SWIGTYPE & "void*"
|
||||
%typemap(dtype) SWIGTYPE & "$dclassname"
|
||||
%typemap(dtype, nativepointer="$dtype") SWIGTYPE & "$dclassname"
|
||||
|
||||
%typemap(ctype) SWIGTYPE *const& "void *"
|
||||
%typemap(imtype) SWIGTYPE *const& "void*"
|
||||
|
|
@ -131,11 +131,18 @@
|
|||
}
|
||||
$result = ($1_ltype)$input; %}
|
||||
|
||||
%typemap(ddirectorin) SWIGTYPE & "new $dclassname($winput, false)"
|
||||
%typemap(ddirectorout) SWIGTYPE & "$dclassname.swigGetCPtr($dcall)"
|
||||
%typemap(ddirectorin,
|
||||
nativepointer="cast($dtype)$winput"
|
||||
) SWIGTYPE & "new $dclassname($winput, false)"
|
||||
%typemap(ddirectorout,
|
||||
nativepointer="cast(void*)$dcall"
|
||||
) SWIGTYPE & "$dclassname.swigGetCPtr($dcall)"
|
||||
|
||||
%typemap(din) SWIGTYPE & "$dclassname.swigGetCPtr($dinput)"
|
||||
%typemap(dout, excode=SWIGEXCODE) SWIGTYPE & {
|
||||
%typemap(din,
|
||||
nativepointer="cast(void*)$dinput"
|
||||
) SWIGTYPE & "$dclassname.swigGetCPtr($dinput)"
|
||||
%typemap(dout, excode=SWIGEXCODE,
|
||||
nativepointer="{\n auto ret = cast($dtype)$imcall;$excode\n return ret;\n}") SWIGTYPE & {
|
||||
$dclassname ret = new $dclassname($imcall, $owner);$excode
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue