[pypy-svn] r29546 - pypy/dist/pypy/rpython/ootypesystem

arigo at codespeak.net arigo at codespeak.net
Sat Jul 1 11:04:59 CEST 2006


Author: arigo
Date: Sat Jul  1 11:04:58 2006
New Revision: 29546

Modified:
   pypy/dist/pypy/rpython/ootypesystem/ootype.py
Log:
...and remove the _add_fields() methods from class Record, to avoid temptation.


Modified: pypy/dist/pypy/rpython/ootypesystem/ootype.py
==============================================================================
--- pypy/dist/pypy/rpython/ootypesystem/ootype.py	(original)
+++ pypy/dist/pypy/rpython/ootypesystem/ootype.py	Sat Jul  1 11:04:58 2006
@@ -222,14 +222,9 @@
     
     def __init__(self, fields):
         self._fields = frozendict()
-        self._add_fields(fields)
-        self._null = _null_record(self)
-
-    def _add_fields(self, fields):
-        fields.copy()
         for name, ITEMTYPE in fields.items():
-            fields[name] = ITEMTYPE, ITEMTYPE._defl()
-        self._fields.update(fields)
+            self._fields[name] = ITEMTYPE, ITEMTYPE._defl()
+        self._null = _null_record(self)
 
     def _defl(self):
         return self._null



More information about the Pypy-commit mailing list