From: Robert Bradshaw Date: Sat, 7 Jun 2008 06:03:29 +0000 (-0700) Subject: Fixed trac-17, default values as class members. X-Git-Tag: 0.9.8rc1~11^2~10^2~5 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5449f98bd9323b5c78694f4ceb245705829f43d2;p=cython.git Fixed trac-17, default values as class members. --- diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index d3084575..1a608049 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -328,7 +328,7 @@ class Context: errors_occurred = True if errors_occurred and result.c_file: try: - Utils.castrate_file(result.c_file, os.stat(source)) + Utils.castrate_file(result.c_file, os.stat(source.filename)) except EnvironmentError: pass result.c_file = None diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 829c4ffb..39755885 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -790,7 +790,7 @@ class FuncDefNode(StatNode, BlockNode): if arg.default: if arg.is_generic: if not hasattr(arg, 'default_entry'): - arg.default.analyse_types(genv) + arg.default.analyse_types(env) arg.default = arg.default.coerce_to(arg.type, genv) if arg.default.is_literal: arg.default_entry = arg.default