diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index effbd606c042da1b185e898cadf08e5a2dc9ea52..8a590a40e042a77862981c2cd4efe5b6be194833 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -3266,11 +3266,11 @@ class CStructOrUnionType(CType): env.use_utility_code(self._convert_to_py_code) return True - def can_coerce_from_pyobject(self): + def can_coerce_from_pyobject(self, env): if env.outer_scope is None or self._convert_from_py_code is False: return False for member in self.scope.var_entries: - if not member.type.assignable_from_resolved_type(PyrexTypes.py_object_type): + if not member.type.can_coerce_from_pyobject(env): return False return True