Commit 69fc7227 authored by Stefan Behnel's avatar Stefan Behnel

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

--HG--
extra : transplant_source : %01%22lN%B0%1D%B9h%AC%2B4%E1F%7FQ%15%E6%F3%F1%9F
parent b0b70e8c
......@@ -9630,7 +9630,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:
......
......@@ -174,7 +174,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.
#
......@@ -2417,6 +2417,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