Fix cpp bool test.
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Aug 2010 23:09:19 +0000 (16:09 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Aug 2010 23:09:19 +0000 (16:09 -0700)
Cython/Compiler/PyrexTypes.py
tests/bugs.txt

index eafe8e3611ee4bb1481c92e62305dcdbcbae2c7f..68437e3dfba2a20a42c8862d109aa1f2609f0d6f 100755 (executable)
@@ -244,7 +244,9 @@ class CTypedefType(BaseType):
         if self.typedef_is_external:
             if not self.to_py_utility_code:
                 base_type = self.typedef_base_type
-                if base_type.is_int:
+                if type(base_type) is CIntType:
+                    # Various subclasses have special methods
+                    # that should be inherited.
                     self.to_py_utility_code, self.to_py_function = \
                         self._create_utility_code(c_typedef_int_to_py_function,
                                                   '__Pyx_PyInt_to_py_%s')
@@ -263,7 +265,9 @@ class CTypedefType(BaseType):
         if self.typedef_is_external:
             if not self.from_py_utility_code:
                 base_type = self.typedef_base_type
-                if base_type.is_int:
+                if type(base_type) is CIntType:
+                    # Various subclasses have special methods
+                    # that should be inherited.
                     self.from_py_utility_code, self.from_py_function = \
                         self._create_utility_code(c_typedef_int_from_py_function,
                                                   '__Pyx_PyInt_from_py_%s')
@@ -879,7 +883,7 @@ class CBIntType(CIntType):
 
     to_py_function = "__Pyx_PyBool_FromLong"
     from_py_function = "__Pyx_PyObject_IsTrue"
-    exception_check = 0
+    exception_check = 1 # for C++ bool
 
     def __repr__(self):
         return "<CNumericType bint>"
index cb56af8b547183d05428e0298f9f129ac7a044b9..d172b4c68354d741e6862df0de969853c8c81068 100644 (file)
@@ -16,7 +16,7 @@ with_statement_module_level_T536
 function_as_method_T494
 closure_inside_cdef_T554
 ipow_crash_T562
-cpp_bool
+
 
 # CPython regression tests that don't current work:
 pyregr.test_threadsignals