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 | |
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
-rw-r--r-- | CHANGES.current | 3 | ||||
-rw-r--r-- | Lib/python/pyhead.swg | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGES.current b/CHANGES.current index 72398e2e9..0775e31e3 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -6,6 +6,9 @@ Version 2.0.9 (in progress) =========================== 2012-12-08: wsfulton + [Python] Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types. + +2012-12-08: wsfulton [Perl] Fix bug #3571361 - C++ comment in C wrappers. 2012-12-07: wsfulton 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 { \ |