%{
// Workaround for undefined SWIGPY_SLICE_ARG with swig 2.0.3 and 2.0.4
// If removed, fails also with swig 3.0, so this has not been fixed ?
// Needs to be investigated
#include <iostream>

#define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
#define SWIGPY_SLICEOBJECT PyObject
%}

%insert("begin") %{
// Needed by SWIG for free/malloc, but not included by Python.h with recent versions of the Stable ABI
#include "stdlib.h"
%}

@ITK_WRAP_PYTHON_SWIG_EXT@
