Commit ab00035a authored by Jason Madden's avatar Jason Madden

Python 3: Stop using undocumented PyLong_AS_LONG.

Since https://github.com/zopefoundation/persistent/issues/125 this would result in compiler warnings.

No change note, this is an internal change.

Fixes #131
parent 3f3736b9
...@@ -23,13 +23,7 @@ ...@@ -23,13 +23,7 @@
#define INTERN PyUnicode_InternFromString #define INTERN PyUnicode_InternFromString
#define INT_FROM_LONG(x) PyLong_FromLong(x) #define INT_FROM_LONG(x) PyLong_FromLong(x)
#define INT_CHECK(x) PyLong_Check(x) #define INT_CHECK(x) PyLong_Check(x)
/* PyLong_AS_LONG isn't a documnted API function. But because of #define INT_AS_LONG(x) PyLong_AsLong(x)
* an issue in persistent/_compat.h, if we define it to be
* the documented function, PyLong_AsLong, we get
* warnings about macro redefinition. See
* https://github.com/zopefoundation/persistent/issues/125
*/
#define INT_AS_LONG(x) PyLong_AS_LONG(x)
#define UINT_FROM_LONG(x) PyLong_FromUnsignedLong(x) #define UINT_FROM_LONG(x) PyLong_FromUnsignedLong(x)
#define UINT_AS_LONG(x) PyLong_AsUnsignedLong(x) #define UINT_AS_LONG(x) PyLong_AsUnsignedLong(x)
#define TEXT_FROM_STRING PyUnicode_FromString #define TEXT_FROM_STRING PyUnicode_FromString
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment