Skip to content
Snippets Groups Projects
Commit adf298e8 authored by David Gobbi's avatar David Gobbi
Browse files

Allow vtk-python override to work with ABCs

The type check in the override() method was too strict, it was not
allowing the override to be derived from an abstract base class.
parent 35fb2ed4
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ static PyObject* PyVTKClass_override(PyObject* cls, PyObject* type)
PyTypeObject* typeobj = (PyTypeObject*)cls;
std::string clsName = vtkPythonUtil::StripModuleFromType(typeobj);
if (Py_TYPE(type) == &PyType_Type)
if (PyObject_TypeCheck(type, &PyType_Type))
{
PyTypeObject* newtypeobj = (PyTypeObject*)type;
if (PyType_IsSubtype(newtypeobj, typeobj))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment