[pypy-svn] r12716 - in pypy/dist/pypy/translator/c: . test
arigo at codespeak.net
arigo at codespeak.net
Sat May 21 19:12:23 CEST 2005
Author: arigo
Date: Sat May 21 19:12:23 2005
New Revision: 12716
Modified:
pypy/dist/pypy/translator/c/node.py
pypy/dist/pypy/translator/c/test/test_database.py
Log:
Forgot to fix this according to the changes in lltypes.py.
Modified: pypy/dist/pypy/translator/c/node.py
==============================================================================
--- pypy/dist/pypy/translator/c/node.py (original)
+++ pypy/dist/pypy/translator/c/node.py Sat May 21 19:12:23 2005
@@ -1,6 +1,7 @@
from __future__ import generators
from pypy.translator.gensupp import C_IDENTIFIER
from pypy.rpython.lltypes import Struct, Array, FuncType, PyObject
+from pypy.rpython.lltypes import GcStruct, GcArray
class StructDefNode:
@@ -61,7 +62,9 @@
ContainerNodeClass = {
Struct: StructNode,
+ GcStruct: StructNode,
Array: ArrayNode,
+ GcArray: ArrayNode,
FuncType: FuncNode,
PyObject: PyObjectNode,
}
Modified: pypy/dist/pypy/translator/c/test/test_database.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_database.py (original)
+++ pypy/dist/pypy/translator/c/test/test_database.py Sat May 21 19:12:23 2005
@@ -13,7 +13,7 @@
def test_struct():
db = LowLevelDatabase()
- S = Struct('test', ('x', Signed))
+ S = GcStruct('test', ('x', Signed))
s = malloc(S)
s.x = 42
assert db.get(s).startswith('&g_')
@@ -22,7 +22,7 @@
def test_inlined_struct():
db = LowLevelDatabase()
- S = Struct('test', ('x', Struct('subtest', ('y', Signed))))
+ S = GcStruct('test', ('x', Struct('subtest', ('y', Signed))))
s = malloc(S)
s.x.y = 42
assert db.get(s).startswith('&g_')
@@ -33,8 +33,8 @@
def test_complete():
db = LowLevelDatabase()
- T = Struct('subtest', ('y', Signed))
- S = Struct('test', ('x', GcPtr(T)))
+ T = GcStruct('subtest', ('y', Signed))
+ S = GcStruct('test', ('x', GcPtr(T)))
s = malloc(S)
s.x = malloc(T)
s.x.y = 42
More information about the Pypy-commit
mailing list