diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2012-12-09 20:49:52 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2012-12-09 20:49:52 +0000 |
commit | 16481c999e4c02c65e74f0207b0760899bc4b74a (patch) | |
tree | f208e32f2f547eee8a979e3a01c8fe91323f03b9 /Lib | |
parent | 5e507b82f1c32ffce40882a930e3894cceb7a4ab (diff) | |
download | swig-16481c999e4c02c65e74f0207b0760899bc4b74a.tar.gz |
Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13953 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/python/pyhead.swg | 4 |
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 { \ |