Commit da74acfb authored by Jim Fulton's avatar Jim Fulton

Ensure that we don't overlook errors in first PyObject_RichCompareBool call.

Python 3.5 turns such cases into SystemErrors.

See: https://bugs.python.org/issue23571

Fixes #15.
parent 6c415d5d
......@@ -6,6 +6,7 @@ python:
- 3.2
- 3.3
- 3.4
- 3.5
- pypy
- pypy3
install:
......
......@@ -27,11 +27,15 @@
#define TEXT_FROM_STRING PyUnicode_FromString
#define TEXT_FORMAT PyUnicode_Format
/* Note that the second comparison is skipped if the first comparison returns:
1 -> There was no error and the answer is -1
-1 -> There was an error, which the caller will detect with PyError_Occurred.
*/
#define COMPARE(lhs, rhs) \
PyObject_RichCompareBool((lhs), (rhs), Py_LT) > 0 ? -1 : \
PyObject_RichCompareBool((lhs), (rhs), Py_LT) != 0 ? -1 : \
(PyObject_RichCompareBool((lhs), (rhs), Py_EQ) > 0 ? 0 : 1)
#else
#define INTERN PyString_InternFromString
......
``BTrees`` Changelog
====================
4.1.5 (unreleased)
4.2.0 (unreleased)
------------------
- TBD
- Python 3.5 support.
4.1.4 (2015-06-02)
------------------
......
......@@ -128,6 +128,7 @@ setup(name='BTrees',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: ZODB",
......
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