[pypy-svn] r46550 - pypy/dist/pypy/translator/oosupport
antocuni at codespeak.net
antocuni at codespeak.net
Thu Sep 13 19:31:59 CEST 2007
Author: antocuni
Date: Thu Sep 13 19:31:58 2007
New Revision: 46550
Modified:
pypy/dist/pypy/translator/oosupport/constant.py
Log:
forgot from the previous checkin
Modified: pypy/dist/pypy/translator/oosupport/constant.py
==============================================================================
--- pypy/dist/pypy/translator/oosupport/constant.py (original)
+++ pypy/dist/pypy/translator/oosupport/constant.py Thu Sep 13 19:31:58 2007
@@ -25,7 +25,6 @@
by the genoo.py subclass of the backend
"""
-from pypy.rpython.lltypesystem import llmemory
from pypy.rpython.ootypesystem import ootype
import operator
@@ -210,7 +209,7 @@
return genoo.CustomDictConst(self.db, value, uniq)
elif isinstance(value, ootype._dict):
return genoo.DictConst(self.db, value, uniq)
- elif isinstance(value, llmemory.fakeweakaddress):
+ elif isinstance(value, ootype._weak_reference):
return genoo.WeakRefConst(self.db, value, uniq)
elif value is ootype.null(value._TYPE):
# for NULL values, we can just use "NULL" const. This is
@@ -692,8 +691,8 @@
# Weak Reference constants
class WeakRefConst(AbstractConst):
- def __init__(self, db, fakeaddr, count):
- AbstractConst.__init__(self, db, fakeaddr.get(), count)
+ def __init__(self, db, wref, count):
+ AbstractConst.__init__(self, db, wref.ll_deref(), count)
self.name = 'WEAKREF__%d' % count
def OOTYPE(self):
More information about the Pypy-commit
mailing list