void director method fix

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4559 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Mark Rose 2003-03-17 11:45:59 +00:00
commit 7c3af222a3
2 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,9 @@
Version 1.3.18 (In progress)
============================
03/17/2003: mrose (Mark Rose)
Fixed the return statement for director base class calls that have no
return value.
03/15/2003: beazley
Fixed a problem with const smart-pointer wrapping. For example:

View file

@ -1457,7 +1457,12 @@ public:
if (pure_virtual) {
Printf(w->code, "throw SWIG_DIRECTOR_PURE_VIRTUAL_EXCEPTION();\n");
} else {
Printf(w->code, "return %s;\n", Swig_method_call(super,l));
if (is_void) {
Printf(w->code, "%s;\n", Swig_method_call(super,l));
Printf(w->code, "return;\n", Swig_method_call(super,l));
} else {
Printf(w->code, "return %s;\n", Swig_method_call(super,l));
}
}
Printf(w->code, "}\n");