Commit 89c37c3c authored by Craig Citro's avatar Craig Citro

Minor cleanups

parent de75062c
...@@ -37,7 +37,8 @@ class CompileError(PyrexError): ...@@ -37,7 +37,8 @@ class CompileError(PyrexError):
# Deprecated and withdrawn in 2.6: # Deprecated and withdrawn in 2.6:
# self.message = message # self.message = message
if position: 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) cont = context(position)
else: else:
pos_str = u"" pos_str = u""
......
...@@ -6059,10 +6059,10 @@ class CoerceFromPyTypeNode(CoercionNode): ...@@ -6059,10 +6059,10 @@ class CoerceFromPyTypeNode(CoercionNode):
self.is_temp = 1 self.is_temp = 1
if not result_type.create_from_py_utility_code(env): if not result_type.create_from_py_utility_code(env):
error(arg.pos, 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(): if self.type.is_string and self.arg.is_ephemeral():
error(arg.pos, error(arg.pos,
"Obtaining char * from temporary Python value") "Obtaining char * from temporary Python value")
def analyse_types(self, env): def analyse_types(self, env):
# The arg is always already analysed # The arg is always already analysed
......
...@@ -146,9 +146,9 @@ class Context(object): ...@@ -146,9 +146,9 @@ class Context(object):
DropRefcountingTransform(), DropRefcountingTransform(),
FinalOptimizePhase(self), FinalOptimizePhase(self),
GilCheck(), GilCheck(),
# ClearResultCodes(self), #ClearResultCodes(self),
# SpecialFunctions(self), #SpecialFunctions(self),
# CreateClosureClasses(context), #CreateClosureClasses(context),
] ]
def create_pyx_pipeline(self, options, result, py=False): def create_pyx_pipeline(self, options, result, py=False):
......
...@@ -1245,10 +1245,10 @@ class StructOrUnionScope(Scope): ...@@ -1245,10 +1245,10 @@ class StructOrUnionScope(Scope):
self.var_entries.append(entry) self.var_entries.append(entry)
if type.is_pyobject and not allow_pyobject: if type.is_pyobject and not allow_pyobject:
error(pos, error(pos,
"C struct/union member cannot be a Python object") "C struct/union member cannot be a Python object")
if visibility != 'private': if visibility != 'private':
error(pos, error(pos,
"C struct/union member cannot be declared %s" % visibility) "C struct/union member cannot be declared %s" % visibility)
return entry return entry
def declare_cfunction(self, name, type, pos, def declare_cfunction(self, name, type, pos,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment