summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Middelschulte <leif.middelschulte@gmail.com>2012-08-20 13:23:03 +0000
committerLeif Middelschulte <leif.middelschulte@gmail.com>2012-08-20 13:23:03 +0000
commit5aa23f9bdbd99954c07069f54b39e669e16aa591 (patch)
tree7076f92a34c2f49c016956aff92c4d4704861e4e
parenta894545c9a0f81948a2f002ad879493d51a71de3 (diff)
downloadswig-5aa23f9bdbd99954c07069f54b39e669e16aa591.tar.gz
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
-rw-r--r--Lib/c/c.swg27
-rw-r--r--Lib/c/std_string.i4
-rw-r--r--Source/Modules/c.cxx8
3 files changed, 4 insertions, 35 deletions
diff --git a/Lib/c/c.swg b/Lib/c/c.swg
index 5fbe4c38b..b67128c76 100644
--- a/Lib/c/c.swg
+++ b/Lib/c/c.swg
@@ -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 ""
diff --git a/Lib/c/std_string.i b/Lib/c/std_string.i
index 8172e4b58..c8e2dff9d 100644
--- a/Lib/c/std_string.i
+++ b/Lib/c/std_string.i
@@ -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*"
diff --git a/Source/Modules/c.cxx b/Source/Modules/c.cxx
index d9a9fbfe3..0fac1cd3e 100644
--- a/Source/Modules/c.cxx
+++ b/Source/Modules/c.cxx
@@ -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