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

15647 Fix bug with wrapping PyObject args in Python.

The check for passthrough "PyObject *" args had an erroneous break
statement, which caused all further args to be ignored.
parent 21df122f
No related branches found
No related tags found
No related merge requests found
......@@ -82,16 +82,25 @@ void vtkWrapPython_DeclareVariables(
{
arg = theFunc->Parameters[i];
if (vtkWrap_IsPythonObject(arg) ||
/* a callable python object for function args */
vtkWrap_IsFunction(arg))
/* a callable python object for function args */
if (vtkWrap_IsFunction(arg))
{
fprintf(fp,
" PyObject *temp%d = NULL;\n",
i);
/* ignore further arguments */
break;
}
/* a PyObject argument will simply be passed through */
if (vtkWrap_IsPythonObject(arg))
{
fprintf(fp,
" PyObject *temp%d;\n",
i);
continue;
}
/* make a "temp" variable for the argument */
vtkWrap_DeclareVariable(fp, data, arg, "temp", i, VTK_WRAP_ARG);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment