[pypy-svn] r25357 - pypy/branch/explicit-exceptions/translator/c
mwh at codespeak.net
mwh at codespeak.net
Wed Apr 5 13:13:03 CEST 2006
Author: mwh
Date: Wed Apr 5 13:13:02 2006
New Revision: 25357
Modified:
pypy/branch/explicit-exceptions/translator/c/database.py
Log:
merging of http://codespeak.net/svn/pypy/dist/pypy/translator/c/database.py
revisions 24785 to 25354:
------------------------------------------------------------------------
r24990 | tismer | 2006-03-25 08:25:03 +0100 (Sat, 25 Mar 2006) | 7 lines
finally after lots of tiny hassles, here is a working implementation of
a generated extension module that exposes its classes and can really be used.
sigh :=)
The next thing to do should be to get rid of PyCObject and use a special
descendant of type object, instead.
------------------------------------------------------------------------
r24795 | mwh | 2006-03-22 13:36:26 +0100 (Wed, 22 Mar 2006) | 3 lines
add a check that we don't call getcontainernode() on a new container too late.
------------------------------------------------------------------------
Modified: pypy/branch/explicit-exceptions/translator/c/database.py
==============================================================================
--- pypy/branch/explicit-exceptions/translator/c/database.py (original)
+++ pypy/branch/explicit-exceptions/translator/c/database.py Wed Apr 5 13:13:02 2006
@@ -19,7 +19,8 @@
class LowLevelDatabase(object):
- def __init__(self, translator=None, standalone=False, gcpolicy=None, thread_enabled=False):
+ def __init__(self, translator=None, standalone=False, gcpolicy=None, thread_enabled=False,
+ instantiators={}):
self.translator = translator
self.standalone = standalone
self.structdefnodes = {}
@@ -35,7 +36,7 @@
self.infs = []
self.namespace = CNameManager()
if not standalone:
- self.pyobjmaker = PyObjMaker(self.namespace, self.get, translator)
+ self.pyobjmaker = PyObjMaker(self.namespace, self.get, translator, instantiators)
if gcpolicy is None:
from pypy.translator.c import gc
gcpolicy = gc.RefcountingGcPolicy
@@ -112,6 +113,7 @@
try:
node = self.containernodes[container]
except KeyError:
+ assert not self.completed
T = typeOf(container)
if isinstance(T, (lltype.Array, lltype.Struct)):
if hasattr(self.gctransformer, 'consider_constant'):
More information about the Pypy-commit
mailing list