Reuse 'ctype' typemap and remove 'proxycouttype' typemap.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13680 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Leif Middelschulte 2012-08-20 13:23:03 +00:00
commit 5aa23f9bdb
3 changed files with 4 additions and 35 deletions

View file

@ -283,33 +283,6 @@ explicit_same_type_unconsted_all_primitive_types_but_void(couttype);
%typemap(couttype, fragment="stdbool_inc") bool & "$1_basetype*"
%typemap(couttype, fragment="stdbool_inc") const bool & "$1_basetype const *"
// typemaps for return values
// void
%typemap(proxycouttype) void "void"
%typemap(proxycouttype) void*, const void* "void *"
// constant pointers
%typemap(proxycouttype) void* * const "void* * const"
%typemap(proxycouttype) const void* * const "const void* * const"
explicit_same_type_all_primitive_types_but_void(proxycouttype);
// objects
%typemap(proxycouttype) SWIGTYPE "$&resolved_type*"
%typemap(proxycouttype) SWIGTYPE * "$resolved_type*"
%typemap(proxycouttype) SWIGTYPE & "$*resolved_type*"
%typemap(proxycouttype) SWIGTYPE *& "$resolved_type**"
%typemap(proxycouttype) SWIGTYPE [ANY] "/*SWIGTYPE [ANY]*/ $1_ltype **"
%typemap(proxycouttype) SWIGTYPE * [ANY] "/*SWIGTYPE *[ANY] */ $1_ltype **"
%typemap(proxycouttype) SWIGTYPE ** "/*SWIGTYPE ** */ $1_ltype **"
%typemap(proxycouttype) enum SWIGTYPE "int"
%typemap(proxycouttype) enum SWIGTYPE &, enum SWIGTYPE * "int *"
%typemap(proxycouttype, fragment="fptr_decl") SWIGTYPE (CLASS::*) "SWIG_CPP_FP"
%typemap(proxycouttype, fragment="stdbool_inc") bool, bool *, const bool, const bool * "$1_ltype"
%typemap(proxycouttype, fragment="stdbool_inc") bool & "$1_basetype*"
%typemap(proxycouttype, fragment="stdbool_inc") const bool & "$1_basetype const *"
same_action_all_primitive_types_but_void(out, "$result = $1;")
%typemap(out) void ""

View file

@ -21,10 +21,6 @@ class string;
%typemap(couttype) string * "char *"
%typemap(couttype) string & "char *"
%typemap(couttype) const string & "char *"
%typemap(proxycouttype) string "char *"
%typemap(proxycouttype) string * "char *"
%typemap(proxycouttype) string & "char *"
%typemap(proxycouttype) const string & "char *"
%typemap(cppouttype, retobj="1") string "std::string*"
%typemap(cppouttype) const string &, string *, string & "std::string*"

View file

@ -792,14 +792,14 @@ ready:
if (IS_SET_TO_ONE(n, "c:objstruct")) {
Printv(return_type, SwigType_str(type, 0), NIL);
}
else if ((tm = Swig_typemap_lookup("proxycouttype", n, "", 0))) {
else if ((tm = Swig_typemap_lookup("ctype", n, "", 0))) {
// handle simple typemap cases
String *ctypeout = Getattr(n, "tmap:proxycouttype:out");
String *ctypeout = Getattr(n, "tmap:ctype:out");
if (ctypeout)
{
//tm = ctypeout;
return_type = ctypeout;
Printf(stdout, "Obscure proxycouttype:out found! O.o\n");
Printf(stdout, "Obscure ctype:out found! O.o\n");
}
else
{
@ -1042,7 +1042,7 @@ ready:
if (ctypeout)
{
tm = ctypeout;
Printf(stdout, "Obscure proxycouttype:out found! O.o\n");
Printf(stdout, "Obscure ctype:out found! O.o\n");
}
Printf(return_type, "%s", tm);
// template handling