From: Robert Bradshaw Date: Wed, 11 Aug 2010 19:26:51 +0000 (-0700) Subject: CPython and C++ bool declarations. X-Git-Tag: 0.13.beta1~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=510c6653e57e8ec67e75f7ccd4952411d6908097;p=cython.git CPython and C++ bool declarations. --- diff --git a/Cython/Includes/cpython/bool.pxd b/Cython/Includes/cpython/bool.pxd index ebf65fe5..a709f260 100644 --- a/Cython/Includes/cpython/bool.pxd +++ b/Cython/Includes/cpython/bool.pxd @@ -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 diff --git a/Cython/Includes/libcpp/__init__.pxd b/Cython/Includes/libcpp/__init__.pxd index fa81adaf..feb8290e 100644 --- a/Cython/Includes/libcpp/__init__.pxd +++ b/Cython/Includes/libcpp/__init__.pxd @@ -1 +1,4 @@ # empty file + +cdef extern from *: + ctypedef bint bool