Fix #2894405 - assertion when using -xmlout.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11841 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-02-05 22:22:35 +00:00
commit 751b8d3b45
3 changed files with 11 additions and 2 deletions

View file

@ -1,6 +1,9 @@
Version 1.3.41 (in progress) Version 1.3.41 (in progress)
============================ ============================
2010-02-05: wsfulton
Fix #2894405 - assertion when using -xmlout.
2010-01-28: wsfulton 2010-01-28: wsfulton
Fix typemap matching bug when a templated type has a typemap both specialized and not Fix typemap matching bug when a templated type has a typemap both specialized and not
specialized. For example: specialized. For example:

View file

@ -25,7 +25,7 @@ char cvsroot_main_cxx[] = "$Id$";
// Global variables // Global variables
Language *lang; // Language method static Language *lang = 0; // Language method
int CPlusPlus = 0; int CPlusPlus = 0;
int Extend = 0; // Extend flag int Extend = 0; // Extend flag
int ForceExtern = 0; // Force extern mode int ForceExtern = 0; // Force extern mode
@ -1231,6 +1231,8 @@ int SWIG_main(int argc, char *argv[], Language *l) {
Swig_print_tree(Getattr(top, "module")); Swig_print_tree(Getattr(top, "module"));
} }
if (dump_xml && top) { if (dump_xml && top) {
delete lang;
lang = 0;
Swig_print_xml(top, xmlout); Swig_print_xml(top, xmlout);
} }
Delete(top); Delete(top);
@ -1265,6 +1267,9 @@ int SWIG_main(int argc, char *argv[], Language *l) {
if ((werror) && (Swig_warn_count())) { if ((werror) && (Swig_warn_count())) {
return Swig_warn_count(); return Swig_warn_count();
} }
delete lang;
return Swig_error_count(); return Swig_error_count();
} }

View file

@ -196,7 +196,8 @@ int main(int margc, char **margv) {
dl = (fac) (); dl = (fac) ();
} }
} }
int res = SWIG_main(argc, argv, dl); int res = SWIG_main(argc, argv, dl);
delete dl;
return res; return res;
} }