xmlrpc-c/added-virtual-destructors-for-classes-with-virtual-m.patch
2008-02-26 21:27:37 +00:00

67 lines
2.0 KiB
Diff

From 65f37adf3bf79cd61f88004b589ed8a5e6a0e1c0 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Mon, 25 Feb 2008 17:52:48 +0100
Subject: [PATCH] added virtual destructors for classes with virtual methods
---
include/xmlrpc-c/registry.hpp | 1 +
include/xmlrpc-c/server_abyss.hpp | 1 +
src/cpp/registry.cpp | 5 +++++
src/cpp/server_abyss.cpp | 3 +++
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/xmlrpc-c/registry.hpp b/include/xmlrpc-c/registry.hpp
index 4b2660d..e5e6b5e 100644
--- a/include/xmlrpc-c/registry.hpp
+++ b/include/xmlrpc-c/registry.hpp
@@ -128,6 +128,7 @@ public:
class shutdown {
public:
+ virtual ~shutdown();
virtual void
doit(std::string const& comment,
void * const callInfo) const = 0;
diff --git a/include/xmlrpc-c/server_abyss.hpp b/include/xmlrpc-c/server_abyss.hpp
index d74dacd..2fc9813 100644
--- a/include/xmlrpc-c/server_abyss.hpp
+++ b/include/xmlrpc-c/server_abyss.hpp
@@ -88,6 +88,7 @@ public:
class shutdown : public xmlrpc_c::registry::shutdown {
public:
shutdown(xmlrpc_c::serverAbyss * const severAbyssP);
+ virtual ~shutdown();
void doit(std::string const& comment, void * const callInfo) const;
private:
xmlrpc_c::serverAbyss * const serverAbyssP;
diff --git a/src/cpp/registry.cpp b/src/cpp/registry.cpp
index 8f8302b..8edc061 100644
--- a/src/cpp/registry.cpp
+++ b/src/cpp/registry.cpp
@@ -423,3 +423,8 @@ registry::c_registry() const {
}
} // namespace
+
+
+registry::shutdown::~shutdown()
+{
+}
diff --git a/src/cpp/server_abyss.cpp b/src/cpp/server_abyss.cpp
index 8c567c4..afc030e 100644
--- a/src/cpp/server_abyss.cpp
+++ b/src/cpp/server_abyss.cpp
@@ -164,6 +164,9 @@ public:
serverAbyss::shutdown::shutdown(serverAbyss * const serverAbyssP) :
serverAbyssP(serverAbyssP) {}
+serverAbyss::shutdown::~shutdown()
+{
+}
void
--
1.5.4.1