Add the dummy methods to helper classes as well, so that unwrapped pure virtual methods are detected and the helper class disabled

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-05-25 21:43:38 +01:00
1 parent c3ab54d71b
commit 884091cce6
2 files changed
+18 -2

No files matched your search

+7 -2
View File
@@ -1020,8 +1020,13 @@ public:
## is a very important fact that needs to be
## recorded in the class, even if the method is
## not wrapped.
dummy = CppDummyMethod(*args, **kwargs)
self._dummy_methods.append(dummy)
method = CppDummyMethod(*args, **kwargs)
self._dummy_methods.append(method)
self._have_pure_virtual_methods = None
helper_class = self.get_helper_class()
if helper_class is not None:
helper_class.add_virtual_method(method)
return None
self._add_method_obj(meth)
return meth
+11
View File
@@ -283,6 +283,12 @@ class DummyReturnValue(ReturnValue):
else:
args, kwargs = utils.parse_retval_spec(arg)
super(DummyReturnValue, self).__init__(args[0])
def convert_c_to_python(self, wrapper):
raise CodeGenerationError
def convert_python_to_c(self, wrapper):
raise CodeGenerationError
def get_c_error_return(self):
return ''
class DummyParameter(Parameter):
@@ -304,6 +310,11 @@ class DummyParameter(Parameter):
args, kwargs = utils.parse_param_spec(arg)
super(DummyParameter, self).__init__(args[0], args[1])
def convert_c_to_python(self, wrapper):
raise CodeGenerationError
def convert_python_to_c(self, wrapper):
raise CodeGenerationError
class CppDummyMethod(CppMethod):
"""