CPython and C++ bool declarations.
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Aug 2010 19:26:51 +0000 (12:26 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Aug 2010 19:26:51 +0000 (12:26 -0700)
Cython/Includes/cpython/bool.pxd
Cython/Includes/libcpp/__init__.pxd

index ebf65fe52eb5005d6b78f0b732e9cadab39de37f..a709f2604696b5f59b38a6e1faf76bf6a0b8e2c4 100644 (file)
@@ -5,6 +5,9 @@ cdef extern from "Python.h":
     # 7.2.2 Boolean Objects
     ############################################################################
 
+    ctypedef class __builtin__.bool [object PyBoolObject]:
+        pass
+
     # Booleans in Python are implemented as a subclass of
     # integers. There are only two booleans, Py_False and Py_True. As
     # such, the normal creation and deletion functions don't apply to
index fa81adaff68e06d8e915a6afa375f62f7e5a8fad..feb8290ec2ebc9a864f11bab646f8c4048fa3138 100644 (file)
@@ -1 +1,4 @@
 # empty file
+
+cdef extern from *:
+    ctypedef bint bool