From 5449f98bd9323b5c78694f4ceb245705829f43d2 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 6 Jun 2008 23:03:29 -0700 Subject: [PATCH] Fixed trac-17, default values as class members. --- Cython/Compiler/Main.py | 2 +- Cython/Compiler/Nodes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.26.2