--- swig/osmosdr_swig.i.orig
+++ swig/osmosdr_swig.i
@@ -16,13 +16,8 @@
 #include "osmosdr/sink.h"
 %}
 
-// Workaround for a SWIG 2.0.4 bug with templates. Probably needs to be looked in to.
 %{
-#if PY_VERSION_HEX >= 0x03020000
-# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
-#else
-# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
-#endif
+#define SWIGPY_SLICEOBJECT PyObject
 %}
 
 %template(string_vector_t) std::vector<std::string>;
