Commit 452c6516 authored by Stefan Behnel's avatar Stefan Behnel

use type.as_argument_type() when adapting temp types, include C function types in special cases

parent c3c2401c
......@@ -9705,7 +9705,7 @@ class CoerceToTempNode(CoercionNode):
def __init__(self, arg, env):
CoercionNode.__init__(self, arg)
self.type = self.arg.type
self.type = self.arg.type.as_argument_type()
self.constant_result = self.arg.constant_result
self.is_temp = 1
if self.type.is_pyobject:
......
......@@ -175,7 +175,7 @@ class PyrexType(BaseType):
# as other_type.
#
# as_argument_type():
# Coerces array type into pointer type for use as
# Coerces array and C function types into pointer type for use as
# a formal argument type.
#
......@@ -2520,6 +2520,9 @@ class CFuncType(CType):
else:
return ""
def as_argument_type(self):
return c_ptr_type(self)
def same_c_signature_as(self, other_type, as_cmethod = 0):
return self.same_c_signature_as_resolved_type(
other_type.resolve(), as_cmethod)
......
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