Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
ff4bc452
Commit
ff4bc452
authored
May 03, 2010
by
David Gobbi
Committed by
Marcus D. Hanwell
Jun 16, 2010
Browse files
BUG: In overload checks, allow Py_None for VTK objects and callbacks.
parent
ab184991
Changes
1
Hide whitespace changes
Inline
Side-by-side
Common/vtkPythonUtil.cxx
View file @
ff4bc452
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment