From 0424eb5dcbdf1f094b671b9fec097ba9e9367719 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <kloeckner@cims.nyu.edu> Date: Mon, 30 Jan 2012 19:00:16 -0500 Subject: [PATCH] Py 2.4 compatibility: numpy may define Py_ssize_t for us. --- src/wrapper/_pvt_struct_v2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wrapper/_pvt_struct_v2.cpp b/src/wrapper/_pvt_struct_v2.cpp index 28cc3ed6..31a16a82 100644 --- a/src/wrapper/_pvt_struct_v2.cpp +++ b/src/wrapper/_pvt_struct_v2.cpp @@ -19,7 +19,9 @@ /* compatibility macros */ #if (PY_VERSION_HEX < 0x02050000) +#ifndef PY_SSIZE_T_MIN typedef long int Py_ssize_t; +#endif #define PyInt_FromSsize_t(x) PyInt_FromLong(x) #define PyInt_AsSsize_t(x) PyInt_AsLong(x) -- GitLab