From a51f81b7a96434098ea78a1d1e4be2ee6683a192 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 3 Dec 2010 16:49:43 +0100 Subject: [PATCH] fix type check as 'slice' --- Cython/Compiler/PyrexTypes.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 77d96f84..4462ca31 100755 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -415,16 +415,13 @@ class BuiltinObjectType(PyObjectType): def type_check_function(self, exact=True): type_name = self.name - if type_name == 'bool': - return 'PyBool_Check' - if type_name == 'str': type_check = 'PyString_Check' elif type_name == 'frozenset': type_check = 'PyFrozenSet_Check' else: type_check = 'Py%s_Check' % type_name.capitalize() - if exact: + if exact and type_name not in ('bool', 'slice'): type_check += 'Exact' return type_check -- 2.26.2