Commit 9b24fd97 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix self-assignment warnings.

This is somewhat of a Gordian Knot approach, but seems to do the trick.
parent c64a5e85
......@@ -62,6 +62,8 @@ modifier_output_mapper = {
'inline': 'CYTHON_INLINE'
}.get
is_self_assignment = re.compile(r" *(\w+) = (\1);\s*$").match
def get_utility_dir():
# make this a function and not global variables:
......@@ -1555,6 +1557,8 @@ class CCodeWriter(object):
self.put(code)
def put(self, code):
if is_self_assignment(code):
return
fix_indent = False
if "{" in code:
dl = code.count("{")
......
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