From 89c37c3c241dd1b24e3ec522505b493774e22cbb Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Fri, 12 Mar 2010 19:47:08 -0800 Subject: [PATCH] Minor cleanups --- Cython/Compiler/Errors.py | 3 ++- Cython/Compiler/ExprNodes.py | 4 ++-- Cython/Compiler/Main.py | 6 +++--- Cython/Compiler/Symtab.py | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cython/Compiler/Errors.py b/Cython/Compiler/Errors.py index c04390da..d35a4327 100644 --- a/Cython/Compiler/Errors.py +++ b/Cython/Compiler/Errors.py @@ -37,7 +37,8 @@ class CompileError(PyrexError): # Deprecated and withdrawn in 2.6: # self.message = message if position: - pos_str = u"%s:%d:%d: " % (position[0].get_description(), position[1], position[2]) + pos_str = u"%s:%d:%d: " % (position[0].get_description(), + position[1], position[2]) cont = context(position) else: pos_str = u"" diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 8659b605..3e240ccf 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -6059,10 +6059,10 @@ class CoerceFromPyTypeNode(CoercionNode): self.is_temp = 1 if not result_type.create_from_py_utility_code(env): error(arg.pos, - "Cannot convert Python object to '%s'" % result_type) + "Cannot convert Python object to '%s'" % result_type) if self.type.is_string and self.arg.is_ephemeral(): error(arg.pos, - "Obtaining char * from temporary Python value") + "Obtaining char * from temporary Python value") def analyse_types(self, env): # The arg is always already analysed diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index db6d194b..736d8147 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -146,9 +146,9 @@ class Context(object): DropRefcountingTransform(), FinalOptimizePhase(self), GilCheck(), -# ClearResultCodes(self), -# SpecialFunctions(self), - # CreateClosureClasses(context), + #ClearResultCodes(self), + #SpecialFunctions(self), + #CreateClosureClasses(context), ] def create_pyx_pipeline(self, options, result, py=False): diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 8282404e..3427b93e 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -1245,10 +1245,10 @@ class StructOrUnionScope(Scope): self.var_entries.append(entry) if type.is_pyobject and not allow_pyobject: error(pos, - "C struct/union member cannot be a Python object") + "C struct/union member cannot be a Python object") if visibility != 'private': error(pos, - "C struct/union member cannot be declared %s" % visibility) + "C struct/union member cannot be declared %s" % visibility) return entry def declare_cfunction(self, name, type, pos, -- 2.26.2