Skip to content

Commit

Permalink
COMP: Only support SWIG slice workaround for Python >= 3.2
Browse files Browse the repository at this point in the history
We now only support Python 3.8+.
  • Loading branch information
thewtex authored and N-Dekker committed Mar 28, 2024
1 parent 5f3adbd commit fad5849
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Wrapping/Generators/Python/module_ext.i.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
// Needs to be investigated
#include <iostream>

#if PY_VERSION_HEX >= 0x03020000
# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
# define SWIGPY_SLICEOBJECT PyObject
#else
# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
# define SWIGPY_SLICEOBJECT PySliceObject
#endif
#define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
#define SWIGPY_SLICEOBJECT PyObject
%}

@ITK_WRAP_PYTHON_SWIG_EXT@

0 comments on commit fad5849

Please sign in to comment.