From 3ff1711d4944e1acc3fef75eb0224680255e2159 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 12 May 2004 21:18:09 +0000 Subject: [PATCH] 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/SWIG@5905 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 5 +++++ Source/Modules/lang.cxx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.current b/CHANGES.current index 9f3f63fe9..9b8ca8e52 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,11 @@ Version 1.3.22 (in progress) ================================== +05/12/2004: wsfulton + Patch for emitting directors when %feature("director") specified + for a class with no virtual methods, but does have a virtual destructor. + Submitted by Kevin Smith. + 05/06/2004: mkoeppe (Matthias Koeppe) New SWIG runtime function SWIG_TypePrettyName, which returns an unmangled type name for a swig_type_info diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx index 9cae59d1e..9211226bb 100644 --- a/Source/Modules/lang.cxx +++ b/Source/Modules/lang.cxx @@ -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,