clear exception after checking if virtual method is implemented.

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2009-07-30 17:45:37 +01:00
1 parent 6fb7893729
commit b62a06ecb8
1 file changed
+1 -1
+1 -1
View File
@@ -810,7 +810,7 @@ class CppVirtualMethodProxy(ReverseWrapperBase):
## just chain to parent class and don't do anything else
call_params = ', '.join([param.name for param in self.parameters])
py_method = self.declarations.declare_variable('PyObject*', 'py_method')
self.before_call.write_code('%s = PyObject_GetAttrString(m_pyself, (char *) "_%s");'
self.before_call.write_code('%s = PyObject_GetAttrString(m_pyself, (char *) "_%s"); PyErr_Clear();'
% (py_method, self.method_name))
self.before_call.add_cleanup_code('Py_XDECREF(%s);' % py_method)