summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Middelschulte <leif.middelschulte@gmail.com>2012-08-20 13:22:33 +0000
committerLeif Middelschulte <leif.middelschulte@gmail.com>2012-08-20 13:22:33 +0000
commitfcecbf17a2862291965192365c77835bf520a299 (patch)
treebd9a040ca4b0b043c14dc70944b15048a92247de
parent7a0a1022f8c1034e099ae304dd66046e9dea66da (diff)
downloadswig-fcecbf17a2862291965192365c77835bf520a299.tar.gz
Rename 'ctype' typemap to 'cmodtype' since it's only used for internal (wrapper) stuff.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13678 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Lib/c/c.swg48
-rw-r--r--Lib/c/std_string.i8
-rw-r--r--Source/Modules/c.cxx12
3 files changed, 34 insertions, 34 deletions
diff --git a/Lib/c/c.swg b/Lib/c/c.swg
index fb9306c83..0da0ffa4e 100644
--- a/Lib/c/c.swg
+++ b/Lib/c/c.swg
@@ -142,34 +142,34 @@ explicit_same_type_all_primitive_types_but_void(proxy);
// typemaps for function parameters
// void
-%typemap(ctype) void "void"
-%typemap(ctype) void*, void& "void *"
-%typemap(ctype) const void&, const void* "const void *"
-%typemap(ctype) void**, void*&, void*[ANY], void[ANY][ANY] "void **"
-%typemap(ctype) const void**, const void*& "const void **"
+%typemap(cmodtype) void "void"
+%typemap(cmodtype) void*, void& "void *"
+%typemap(cmodtype) const void&, const void* "const void *"
+%typemap(cmodtype) void**, void*&, void*[ANY], void[ANY][ANY] "void **"
+%typemap(cmodtype) const void**, const void*& "const void **"
// constant pointers
-%typemap(ctype) void* * const "void* * const"
-%typemap(ctype) const void* * const "const void* * const"
+%typemap(cmodtype) void* * const "void* * const"
+%typemap(cmodtype) const void* * const "const void* * const"
-explicit_same_type_all_primitive_types_but_void(ctype);
+explicit_same_type_all_primitive_types_but_void(cmodtype);
// special cases of array passing - does not intended to be used for objects
-%typemap(ctype) SWIGTYPE [] "$1_ltype"
-%typemap(ctype) SWIGTYPE ((&)[ANY]) "$1_basetype **"
-
-%typemap(ctype) SWIGTYPE "SwigObj *"
-%typemap(ctype) SWIGTYPE * "SwigObj *"
-%typemap(ctype) SWIGTYPE & "SwigObj *"
-%typemap(ctype) SWIGTYPE [ANY][ANY], SWIGTYPE ** "/* whoa */ SwigObj ***"
-%typemap(ctype) SWIGTYPE *[ANY] "/*ooooh*/ SwigObj **"
-%typemap(ctype) SWIGTYPE *& "/* *& */ SwigObj **"
-%typemap(ctype) enum SWIGTYPE "int"
-%typemap(ctype) enum SWIGTYPE &, enum SWIGTYPE * "int *"
-%typemap(ctype, fragment="fptr_decl", fragment="fptr_decl_proxy") SWIGTYPE (CLASS::*) "SWIG_CPP_FP"
-
-%typemap(ctype, fragment="stdbool_inc") bool, bool *, bool **, const bool, const bool *, bool * [ANY] "$1_type"
-%typemap(ctype, fragment="stdbool_inc") bool & "$1_ltype"
-%typemap(ctype, fragment="stdbool_inc") const bool & "$1_ltype const"
+%typemap(cmodtype) SWIGTYPE [] "$1_ltype"
+%typemap(cmodtype) SWIGTYPE ((&)[ANY]) "$1_basetype **"
+
+%typemap(cmodtype) SWIGTYPE "SwigObj *"
+%typemap(cmodtype) SWIGTYPE * "SwigObj *"
+%typemap(cmodtype) SWIGTYPE & "SwigObj *"
+%typemap(cmodtype) SWIGTYPE [ANY][ANY], SWIGTYPE ** "/* whoa */ SwigObj ***"
+%typemap(cmodtype) SWIGTYPE *[ANY] "/*ooooh*/ SwigObj **"
+%typemap(cmodtype) SWIGTYPE *& "/* *& */ SwigObj **"
+%typemap(cmodtype) enum SWIGTYPE "int"
+%typemap(cmodtype) enum SWIGTYPE &, enum SWIGTYPE * "int *"
+%typemap(cmodtype, fragment="fptr_decl", fragment="fptr_decl_proxy") SWIGTYPE (CLASS::*) "SWIG_CPP_FP"
+
+%typemap(cmodtype, fragment="stdbool_inc") bool, bool *, bool **, const bool, const bool *, bool * [ANY] "$1_type"
+%typemap(cmodtype, fragment="stdbool_inc") bool & "$1_ltype"
+%typemap(cmodtype, fragment="stdbool_inc") const bool & "$1_ltype const"
same_action_all_primitive_types_but_void(in, "$1 = ($1_ltype) $input;")
diff --git a/Lib/c/std_string.i b/Lib/c/std_string.i
index c5e47cb5c..d2289171d 100644
--- a/Lib/c/std_string.i
+++ b/Lib/c/std_string.i
@@ -9,10 +9,10 @@ namespace std {
class string;
-%typemap(ctype) string "char *"
-%typemap(ctype) string * "char *"
-%typemap(ctype) string & "char *"
-%typemap(ctype) const string & "char *"
+%typemap(cmodtype) string "char *"
+%typemap(cmodtype) string * "char *"
+%typemap(cmodtype) string & "char *"
+%typemap(cmodtype) const string & "char *"
%typemap(proxy) string "char *"
%typemap(proxy) string * "char *"
%typemap(proxy) string & "char *"
diff --git a/Source/Modules/c.cxx b/Source/Modules/c.cxx
index 006542b35..8a25e1f6b 100644
--- a/Source/Modules/c.cxx
+++ b/Source/Modules/c.cxx
@@ -903,7 +903,7 @@ ready:
//Swig_typemap_attach_parms("in", parms, 0);
// attach typemaps to cast wrapper call with proxy types
- Swig_typemap_attach_parms("ctype", parms, 0);
+ Swig_typemap_attach_parms("cmodtype", parms, 0);
// prepare function definition
for (p = parms, gencomma = 0; p; ) {
@@ -932,13 +932,13 @@ ready:
Printf(arg_name, "c%s", lname);
// set the appropriate type for parameter
- if ((tm = Getattr(p, "tmap:ctype"))) {
+ if ((tm = Getattr(p, "tmap:cmodtype"))) {
Printv(c_parm_type, NewString("("), tm, NewString(")"), NIL);
// template handling
Replaceall(c_parm_type, "$tt", SwigType_lstr(type, 0));
}
else {
- Swig_warning(WARN_C_TYPEMAP_CTYPE_UNDEF, input_file, line_number, "No ctype typemap defined for %s\n", SwigType_str(type, 0));
+ Swig_warning(WARN_C_TYPEMAP_CTYPE_UNDEF, input_file, line_number, "No cmodtype typemap defined for %s\n", SwigType_str(type, 0));
}
/*
@@ -1096,7 +1096,7 @@ ready:
Setattr(n, "wrap:parms", parms); //never read again?!
// attach 'ctype' typemaps
- Swig_typemap_attach_parms("ctype", parms, wrapper);
+ Swig_typemap_attach_parms("cmodtype", parms, wrapper);
// prepare function definition
for (p = parms, gencomma = 0; p; ) {
@@ -1124,13 +1124,13 @@ ready:
Printf(arg_name, "c%s", lname);
// set the appropriate type for parameter
- if ((tm = Getattr(p, "tmap:ctype"))) {
+ if ((tm = Getattr(p, "tmap:cmodtype"))) {
Printv(c_parm_type, tm, NIL);
// template handling
Replaceall(c_parm_type, "$tt", SwigType_lstr(type, 0));
}
else {
- Swig_warning(WARN_C_TYPEMAP_CTYPE_UNDEF, input_file, line_number, "No ctype typemap defined for %s\n", SwigType_str(type, 0));
+ Swig_warning(WARN_C_TYPEMAP_CTYPE_UNDEF, input_file, line_number, "No cmodtype typemap defined for %s\n", SwigType_str(type, 0));
}
// use proxy-type for parameter if supplied