From c341e94a8975f76f1d217d2a77bc033ce4bf1fa8 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Thu, 27 Aug 2009 23:49:09 +0100 Subject: [PATCH] Fix issue with duplicate parent callers --- pybindgen/cppclass.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index b9e0932..214d8a0 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -237,7 +237,12 @@ class CppHelperClass(object): overload.pystruct = self.class_.pystruct self.virtual_parent_callers[name] = overload assert self.class_ is not None - overload.add(parent_caller) + + for existing in overload.wrappers: + if parent_caller.matches_signature(existing): + break # don't re-add already existing method + else: + overload.add(parent_caller) def add_custom_method(self, declaration, body=None): """