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
Pipeline #6973 passed with stage
......@@ -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);
......
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