On 29/01/20 1:33 am, John Skaller2 wrote:
# This conflicts with the C++ bool type, and unfortunately # C++ is too liberal about PyObject* <-> bool conversions, # resulting in unintuitive runtime behavior and segfaults. # ("bool", "PyBool_Type", []), Now you have me worried! Any more detailed explanation of this issue?
I think it's just that the name "bool" refers to different things in Python and C++, and trying to unify them would lead to problems. So Cython has chosen to use "bool" to mean the Python type, and introduced "bint" for the C++ notion of a bool. This is consistent with the general philosophy that the Cython language is an extension of Python, so where there is a conflict between Python smantics and C or C++ semantics, Python wins. -- Greg _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel