Commit 621b6d11 authored by Stefan Behnel's avatar Stefan Behnel

undo incorrect coercion removal - passing through C types might be required...

undo incorrect coercion removal - passing through C types might be required due to low-level value conversions
parent df63b793
...@@ -1979,9 +1979,6 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin, ...@@ -1979,9 +1979,6 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin,
arg = node.arg arg = node.arg
if isinstance(arg, ExprNodes.CoerceFromPyTypeNode): if isinstance(arg, ExprNodes.CoerceFromPyTypeNode):
arg = arg.arg arg = arg.arg
if arg.type.is_pyobject:
if node.type in (arg.type, PyrexTypes.py_object_type):
return arg
if isinstance(arg, ExprNodes.PythonCapiCallNode): if isinstance(arg, ExprNodes.PythonCapiCallNode):
if arg.function.name == 'float' and len(arg.args) == 1: if arg.function.name == 'float' and len(arg.args) == 1:
# undo redundant Py->C->Py coercion # undo redundant Py->C->Py coercion
......
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