summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/python/pyhead.swg4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/python/pyhead.swg b/Lib/python/pyhead.swg
index c333e9d89..cedd017a7 100644
--- a/Lib/python/pyhead.swg
+++ b/Lib/python/pyhead.swg
@@ -175,6 +175,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
}
#endif
+#if PY_VERSION_HEX < 0x02050000
+#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
+#endif
+
#if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op) \
do { \