Commit ba225656 authored by Stefan Behnel's avatar Stefan Behnel

cleanup

parent b4aa6d3f
...@@ -1674,8 +1674,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform): ...@@ -1674,8 +1674,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
node, "__Pyx_PyUnicode_Tailmatch", self.PyUnicode_Tailmatch_func_type, node, "__Pyx_PyUnicode_Tailmatch", self.PyUnicode_Tailmatch_func_type,
method_name, is_unbound_method, args, method_name, is_unbound_method, args,
utility_code = unicode_tailmatch_utility_code) utility_code = unicode_tailmatch_utility_code)
return ExprNodes.CoerceToPyTypeNode( return method_call.coerce_to(Builtin.bool_type, self.current_env())
method_call, self.current_env(), Builtin.bool_type)
PyUnicode_Find_func_type = PyrexTypes.CFuncType( PyUnicode_Find_func_type = PyrexTypes.CFuncType(
PyrexTypes.c_py_ssize_t_type, [ PyrexTypes.c_py_ssize_t_type, [
...@@ -1713,8 +1712,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform): ...@@ -1713,8 +1712,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
method_call = self._substitute_method_call( method_call = self._substitute_method_call(
node, "PyUnicode_Find", self.PyUnicode_Find_func_type, node, "PyUnicode_Find", self.PyUnicode_Find_func_type,
method_name, is_unbound_method, args) method_name, is_unbound_method, args)
return ExprNodes.CoerceToPyTypeNode( return method_call.coerce_to_pyobject(self.current_env())
method_call, self.current_env(), PyrexTypes.py_object_type)
PyUnicode_Count_func_type = PyrexTypes.CFuncType( PyUnicode_Count_func_type = PyrexTypes.CFuncType(
PyrexTypes.c_py_ssize_t_type, [ PyrexTypes.c_py_ssize_t_type, [
...@@ -1740,8 +1738,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform): ...@@ -1740,8 +1738,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
method_call = self._substitute_method_call( method_call = self._substitute_method_call(
node, "PyUnicode_Count", self.PyUnicode_Count_func_type, node, "PyUnicode_Count", self.PyUnicode_Count_func_type,
'count', is_unbound_method, args) 'count', is_unbound_method, args)
return ExprNodes.CoerceToPyTypeNode( return method_call.coerce_to_pyobject(self.current_env())
method_call, self.current_env(), PyrexTypes.py_object_type)
PyUnicode_Replace_func_type = PyrexTypes.CFuncType( PyUnicode_Replace_func_type = PyrexTypes.CFuncType(
Builtin.unicode_type, [ Builtin.unicode_type, [
......
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