[pypy-commit] pypy py3.5: Fix extra_tests/ctypes_tests/test_extra.py::test_truth_value()

rlamy pypy.commits at gmail.com
Wed Jan 16 15:28:29 EST 2019


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r95653:cd262738eee3
Date: 2019-01-16 20:27 +0000
http://bitbucket.org/pypy/pypy/changeset/cd262738eee3/

Log:	Fix extra_tests/ctypes_tests/test_extra.py::test_truth_value()

diff --git a/lib_pypy/_ctypes/primitive.py b/lib_pypy/_ctypes/primitive.py
--- a/lib_pypy/_ctypes/primitive.py
+++ b/lib_pypy/_ctypes/primitive.py
@@ -410,6 +410,6 @@
                                             id(self))
 
     def __bool__(self):
-        return self._buffer[0] not in (0, '\x00')
+        return self._buffer[0] not in (0, b'\x00')
 
 from _ctypes.function import CFuncPtr


More information about the pypy-commit mailing list