mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Merged revisions 86545 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86545 | benjamin.peterson | 2010-11-19 22:31:07 -0600 (Fri, 19 Nov 2010) | 1 line new plan: functions that want 'tmp' can declare it ........
This commit is contained in:
parent
fdd52bea44
commit
787cddc93d
2 changed files with 6 additions and 23 deletions
|
@ -365,10 +365,7 @@ class Obj2ModVisitor(PickleVisitor):
|
|||
self.emit("int", 0)
|
||||
self.emit("obj2ast_%s(PyObject* obj, %s* out, PyArena* arena)" % (name, ctype), 0)
|
||||
self.emit("{", 0)
|
||||
self.emit("PyObject* tmp = NULL;", 1)
|
||||
self.emit("int isinstance;", 1)
|
||||
# Prevent compiler warnings about unused variable.
|
||||
self.emit("tmp = tmp;", 1)
|
||||
self.emit("", 0)
|
||||
|
||||
def sumTrailer(self, name, add_label=False):
|
||||
|
@ -403,6 +400,7 @@ class Obj2ModVisitor(PickleVisitor):
|
|||
|
||||
def complexSum(self, sum, name):
|
||||
self.funcHeader(name)
|
||||
self.emit("PyObject *tmp = NULL;", 1)
|
||||
for a in sum.attributes:
|
||||
self.visitAttributeDeclaration(a, name, sum=sum)
|
||||
self.emit("", 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue