patch by Kevin Smith to emit directors when %feature("director") is specified for a class with no virtual methods, but a virtual destructor

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5905 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-05-12 21:18:09 +00:00
commit 9705ff87be
2 changed files with 6 additions and 1 deletions

View file

@ -1708,7 +1708,7 @@ int Language::classDirector(Node *n) {
Hash* vtable = NewHash();
int virtual_destructor = 0;
unrollVirtualMethods(n, n, vtable, 0, virtual_destructor);
if (Len(vtable) > 0) {
if (virtual_destructor || Len(vtable) > 0) {
if (!virtual_destructor) {
String *classtype = Getattr(n, "classtype");
Swig_warning(WARN_LANG_DIRECTOR_VDESTRUCT, input_file, line_number,