Skip to content
Snippets Groups Projects
Commit 1b7c71f5 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Merge remote-tracking branch 'gl/dgobbi/15647-PyObject-Wrapping' into release-6.3

* gl/dgobbi/15647-PyObject-Wrapping:
  15647 Fix bug with wrapping PyObject args in Python.

Merge-request: !1213
parents 1bdcd795 eacf1d20
No related branches found
No related tags found
No related merge requests found
......@@ -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))
/* 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.
Finish editing this message first!
Please register or to comment