Commit 230500c8 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot
Browse files

Merge topic '15647-PyObject-Wrapping'

eacf1d20

 15647 Fix bug with wrapping PyObject args in Python.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !1213
parents 810993d9 eacf1d20
Pipeline #6999 failed with stage
......@@ -78,16 +78,25 @@ void vtkWrapPython_DeclareVariables(
{
arg = theFunc->Parameters[i];
if (vtkWrap_IsPythonObject(arg) ||
/* a callable python object for function args */
vtkWrap_IsFunction(arg))
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