From 510c6653e57e8ec67e75f7ccd4952411d6908097 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 11 Aug 2010 12:26:51 -0700 Subject: [PATCH] CPython and C++ bool declarations. --- Cython/Includes/cpython/bool.pxd | 3 +++ Cython/Includes/libcpp/__init__.pxd | 3 +++ 2 files changed, 6 insertions(+) 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 -- 2.26.2