add templatereduce option

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-28 23:49:41 +00:00
commit 1ac5674df0
4 changed files with 58 additions and 0 deletions

View file

@ -45,6 +45,7 @@ extern SwigType *Swig_cparse_type(String *);
extern Node *Swig_cparse(File *);
extern Hash *Swig_cparse_features();
extern void SWIG_cparse_set_compact_default_args(int defargs);
extern void SWIG_cparse_template_reduce(int treduce);
/* util.c */
extern void Swig_cparse_replace_descriptor(String *s);

View file

@ -171,6 +171,10 @@ void SWIG_cparse_set_compact_default_args(int defargs) {
compact_default_args = defargs;
}
void SWIG_cparse_template_reduce(int treduce) {
template_reduce = treduce;
}
/* -----------------------------------------------------------------------------
* Assist functions
* ----------------------------------------------------------------------------- */

View file

@ -83,6 +83,7 @@ static const char *usage2 = (const char*)"\
-outdir <dir> - Set language specific files output directory\n\
-small - Compile in virtual elimination & compact mode\n\
-swiglib - Report location of SWIG library and exit\n\
-templatereduce - Swig reduce all the typedefs in templates \n\
-v - Run in verbose mode\n\
-version - Print SWIG version number\n\
-Wall - Enable all warning messages\n\
@ -332,6 +333,9 @@ void SWIG_getoptions(int argc, char *argv[])
} else if (strcmp(argv[i],"-show_templates") == 0) {
Swig_cparse_debug_templates(1);
Swig_mark_arg(i);
} else if (strcmp(argv[i],"-templatereduce") == 0) {
SWIG_cparse_template_reduce(1);
Swig_mark_arg(i);
} else if (strcmp(argv[i],"-swiglib") == 0) {
printf("%s\n", LibDir);
SWIG_exit (EXIT_SUCCESS);