swig/swig-fixassert.diff
OBS User autobuild aeb131732a Accepting request 32511 from devel:tools:building
Copy from devel:tools:building/swig based on submit request 32511 from user coolo

OBS-URL: https://build.opensuse.org/request/show/32511
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swig?expand=0&rev=15
2010-02-14 11:35:50 +00:00

52 lines
1.3 KiB
Diff

------------------------------------------------------------------------
r11841 | wsfulton | 2010-02-05 23:22:35 +0100 (Fr, 05. Feb 2010) | 1 Zeile
Fix #2894405 - assertion when using -xmlout.
------------------------------------------------------------------------
Index: Source/Modules/swigmain.cxx
===================================================================
--- Source/Modules/swigmain.cxx (Revision 11840)
+++ Source/Modules/swigmain.cxx (Revision 11841)
@@ -196,7 +196,8 @@
dl = (fac) ();
}
}
+
int res = SWIG_main(argc, argv, dl);
- delete dl;
+
return res;
}
Index: Source/Modules/main.cxx
===================================================================
--- Source/Modules/main.cxx (Revision 11840)
+++ Source/Modules/main.cxx (Revision 11841)
@@ -25,7 +25,7 @@
// Global variables
-Language *lang; // Language method
+static Language *lang = 0; // Language method
int CPlusPlus = 0;
int Extend = 0; // Extend flag
int ForceExtern = 0; // Force extern mode
@@ -1231,6 +1231,8 @@
Swig_print_tree(Getattr(top, "module"));
}
if (dump_xml && top) {
+ delete lang;
+ lang = 0;
Swig_print_xml(top, xmlout);
}
Delete(top);
@@ -1265,6 +1267,9 @@
if ((werror) && (Swig_warn_count())) {
return Swig_warn_count();
}
+
+ delete lang;
+
return Swig_error_count();
}