Commit a51f81b7 authored by Stefan Behnel's avatar Stefan Behnel

fix type check as 'slice'

parent e5453979
...@@ -415,16 +415,13 @@ class BuiltinObjectType(PyObjectType): ...@@ -415,16 +415,13 @@ class BuiltinObjectType(PyObjectType):
def type_check_function(self, exact=True): def type_check_function(self, exact=True):
type_name = self.name type_name = self.name
if type_name == 'bool':
return 'PyBool_Check'
if type_name == 'str': if type_name == 'str':
type_check = 'PyString_Check' type_check = 'PyString_Check'
elif type_name == 'frozenset': elif type_name == 'frozenset':
type_check = 'PyFrozenSet_Check' type_check = 'PyFrozenSet_Check'
else: else:
type_check = 'Py%s_Check' % type_name.capitalize() type_check = 'Py%s_Check' % type_name.capitalize()
if exact: if exact and type_name not in ('bool', 'slice'):
type_check += 'Exact' type_check += 'Exact'
return type_check return type_check
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment