diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index ca50dd1..3ff3fdd 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -1696,7 +1696,7 @@ static PyObject*\n%s(%s *self) if self.has_copy_constructor: try: - copy_wrapper_name = utils.call_with_error_handling(self._generate_copy_method, (code_sink,), {}, None) + copy_wrapper_name = utils.call_with_error_handling(self._generate_copy_method, (code_sink,), {}, self) except utils.SkipWrapper: pass else: diff --git a/pybindgen/cppmethod.py b/pybindgen/cppmethod.py index c9c1c78..100d76b 100644 --- a/pybindgen/cppmethod.py +++ b/pybindgen/cppmethod.py @@ -552,6 +552,7 @@ class CppFunctionAsConstructor(CppConstructor): @type parameters: list of L{Parameter} """ + self.stack_where_defined = traceback.extract_stack() if unblock_threads is None: unblock_threads = settings.unblock_threads