Skip to content

Fix wrapping pointer parameters with default value 0.

David Gobbi requested to merge dgobbi/vtk:wrap-default-null-pointers into master

When the python wrappers were wrapping a pointer parameter with a default value of null, e.g. func(int *x=0), then if no parameter was passed then the underlying C++ function would receive an uninitialized array rather a null pointer.

In addition, the SaveArray() and ArrayHasChanged() methods that the python wrappers use when wrapping non-const pointers and arrays would overflow when the array size was zero.

Merge request reports