Author: Ronan Lamy <[email protected]>
Branch:
Changeset: r73759:fefbbb1439a7
Date: 2014-10-02 15:36 +0100
http://bitbucket.org/pypy/pypy/changeset/fefbbb1439a7/
Log: clarify dependencies of Node.computegcinfo()
diff --git a/rpython/translator/c/node.py b/rpython/translator/c/node.py
--- a/rpython/translator/c/node.py
+++ b/rpython/translator/c/node.py
@@ -101,9 +101,9 @@
else:
typename = db.gettype(T, who_asks=self)
self.fields.append((self.c_struct_field_name(name), typename))
- self.computegcinfo(self.db)
+ self.computegcinfo(self.db.gcpolicy)
- def computegcinfo(self, db):
+ def computegcinfo(self, gcpolicy):
# let the gcpolicy do its own setup
self.gcinfo = None # unless overwritten below
rtti = None
@@ -114,7 +114,7 @@
except ValueError:
pass
if self.varlength is None:
- db.gcpolicy.struct_setup(self, rtti)
+ gcpolicy.struct_setup(self, rtti)
return self.gcinfo
def gettype(self):
@@ -211,7 +211,7 @@
return # setup() was already called, likely by __init__
db = self.db
ARRAY = self.ARRAY
- self.computegcinfo(db)
+ self.computegcinfo(db.gcpolicy)
if self.varlength is not None:
self.normalizedtypename = db.gettype(ARRAY, who_asks=self)
if needs_gcheader(ARRAY):
@@ -221,11 +221,11 @@
self.gcfields.append(gc_field)
self.itemtypename = db.gettype(ARRAY.OF, who_asks=self)
- def computegcinfo(self, db):
+ def computegcinfo(self, gcpolicy):
# let the gcpolicy do its own setup
self.gcinfo = None # unless overwritten below
if self.varlength is None:
- self.db.gcpolicy.array_setup(self)
+ gcpolicy.array_setup(self)
return self.gcinfo
def gettype(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit