better option name templatereduce
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6542 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
288f1dc402
commit
fc2f54c647
3 changed files with 11 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#ifdef SWIGPYTHON
|
||||
%module("tpltreduc") template_typedef
|
||||
%module("templatereduce") template_typedef
|
||||
#else
|
||||
%module template_typedef
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
%module("tpltreduc") template_typedef_ptr
|
||||
%module("templatereduce") template_typedef_ptr
|
||||
%module("templatereduce") template_typedef_ptr
|
||||
|
||||
/*
|
||||
Use the "tpltreduc" to force swig to reduce the temaplate
|
||||
typedef as much as possible.
|
||||
Use the "templatereduce" option to force swig to reduce the
|
||||
temaplate typedef as much as possible.
|
||||
|
||||
This fix cases like this one, but it can prevent some
|
||||
typemaps for working.
|
||||
This fix cases like the one in this file, but it can prevent some
|
||||
typemaps for working as expected.
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static Parm *template_parameters = 0;
|
|||
static int extendmode = 0;
|
||||
static int dirprot_mode = 0;
|
||||
static int compact_default_args = 0;
|
||||
static int template_typedef_reduction = 0;
|
||||
static int template_reduce = 0;
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Assist Functions
|
||||
|
|
@ -1625,8 +1625,8 @@ module_directive: MODULE options idstring {
|
|||
*/
|
||||
dirprot_mode = 1;
|
||||
}
|
||||
if (Getattr($2,"tpltreduc")) {
|
||||
template_typedef_reduction = 1;
|
||||
if (Getattr($2,"templatereduce")) {
|
||||
template_reduce = 1;
|
||||
}
|
||||
}
|
||||
if (!ModuleName) ModuleName = NewString($3);
|
||||
|
|
@ -2134,7 +2134,7 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va
|
|||
if (!value) {
|
||||
SwigType *ty = Getattr(p,"type");
|
||||
if (ty) {
|
||||
if (template_typedef_reduction) {
|
||||
if (template_reduce) {
|
||||
SwigType *rty = Swig_symbol_typedef_reduce(ty,0);
|
||||
ty = Swig_symbol_type_qualify(rty,0);
|
||||
Setattr(p,"type",ty);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue