# HG changeset patch # User Bob Ippolito <bob@redivi.com> # Date 1303243129 25200 # Tue Apr 19 12:58:49 2011 -0700 # Node ID 42614ea00847d8c93a46bfe82062cbe90306a1bb # Parent 424c97f45f000d3144ef69f7d128e078631e8c6c https://github.com/simplejson/simplejson/issues/5 diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +Version 2.1.6 released 2011-XX-XX + +* Fix compatibility with Python 2.5 + https://github.com/simplejson/simplejson/issues/5 + Version 2.1.5 released 2011-04-17 * Built sdist tarball with setuptools_git installed. Argh. diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -18,6 +18,9 @@ #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TYPE) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #endif +#if PY_VERSION_HEX < 0x02060000 && !defined(Py_SIZE) +#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) +#endif #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX