From: DaniloFreitas Date: Thu, 9 Jul 2009 08:10:38 +0000 (-0300) Subject: small fixes X-Git-Tag: 0.13.beta0~353^2~62^2 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a7cd6f1352ca4d6628f0b7470ab1cc24ba42818c;p=cython.git small fixes --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index c8563e45..acb907c1 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2395,7 +2395,9 @@ class SimpleCallNode(CallNode): actual_nargs = len(self.args) possibilities = [] for entry in entries: - type = entry.type.base_type + type = entry.type + if type.is_ptr: + type = type.base_type # Check no. of args max_nargs = len(type.args) expected_nargs = max_nargs - type.optional_arg_count @@ -2422,6 +2424,9 @@ class SimpleCallNode(CallNode): possibilities.sort() if len(possibilities) > 1 and possibilities[0][0] == possibilities[1][0]: error(self.pos, "Ambiguity found on %s" % possibilities[0][1].name) + self.args = None + self.type = PyrexTypes.error_type + self.result_code = "" return None return possibilities[0][1] error(self.pos, @@ -2442,6 +2447,8 @@ class SimpleCallNode(CallNode): def analyse_c_function_call(self, env): entry = self.best_match() + if not entry: + return self.function.entry = entry self.function.type = entry.type func_type = self.function_type()