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:
1 parent
c3ab54d71b
commit
884091cce6
2 files changed
+18
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user