Don't call a constructor, from a constructor wrapper, if it is not public

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-05-22 18:53:52 +01:00
1 parent 8ff41f247c
commit 9ab9fd8c00
1 file changed
+2
+2
View File
@@ -322,6 +322,8 @@ class CppConstructor(ForwardWrapperBase):
self.before_call.indent()
try:
if self.visibility != 'public':
raise CodeGenerationError
class_.get_construct_name()
except CodeGenerationError:
self.before_call.write_code('PyErr_SetString(PyExc_TypeError, "class \'%s\' '