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
This commit is contained in:
parent
7a0a1022f8
commit
fcecbf17a2
3 changed files with 32 additions and 32 deletions
44
Lib/c/c.swg
44
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(cmodtype) SWIGTYPE [] "$1_ltype"
|
||||
%typemap(cmodtype) 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(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(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, 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;")
|
||||
|
||||
|
|
|
|||
|
|
@ -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 *"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue