From: Stefan Behnel Date: Fri, 3 Dec 2010 15:49:43 +0000 (+0100) Subject: fix type check as 'slice' X-Git-Tag: 0.14.alpha0~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a51f81b7a96434098ea78a1d1e4be2ee6683a192;p=cython.git fix type check as 'slice' --- 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