Commit ff4bc452 authored by David Gobbi's avatar David Gobbi Committed by Marcus D. Hanwell
Browse files

BUG: In overload checks, allow Py_None for VTK objects and callbacks.

parent ab184991
......@@ -1490,6 +1490,20 @@ int PyVTKCheckArg(PyObject *arg, const char *format, const char *classname)
if (name[0] == 'f' && strcmp(name, "func") == 0)
{
if (!PyCallable_Check(arg))
{
penalty = 1;
if (arg != Py_None)
{
penalty = -1;
}
}
}
else if (arg == Py_None)
{
penalty = 1;
vtkstd::map<vtkstd::string, PyObject*>::iterator iter =
vtkPythonHash->ClassHash->find(name);
if(iter == vtkPythonHash->ClassHash->end())
{
penalty = -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment