From 02bbd782a80d76ea2b9a59c78db2fe5abda06d8e Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 19 Aug 2008 15:27:12 +0100 Subject: [PATCH] Only enable the copy constructor if is public. --- pybindgen/cppclass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index aa42eec..4dcc3f3 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -1144,8 +1144,8 @@ public: self.constructors.append(wrapper) if not wrapper.parameters: self.has_trivial_constructor = True # FIXME: I don't remember what is this used for anymore, maybe remove - if len(wrapper.parameters) == 1 and isinstance(wrapper.parameters[0], CppClassParameterBase) \ - and wrapper.parameters[0].cpp_class is self: + if len(wrapper.parameters) == 1 and isinstance(wrapper.parameters[0], (CppClassRefParameter, CppClassParameter)) \ + and wrapper.parameters[0].cpp_class is self and wrapper.visibility == 'public': self.has_copy_constructor = True def add_output_stream_operator(self):