Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r61530:b1d924aa5a40
Date: 2013-02-21 11:47 +0200
http://bitbucket.org/pypy/pypy/changeset/b1d924aa5a40/
Log: fix
diff --git a/rpython/jit/backend/x86/test/test_zrpy_releasegil.py
b/rpython/jit/backend/x86/test/test_zrpy_releasegil.py
--- a/rpython/jit/backend/x86/test/test_zrpy_releasegil.py
+++ b/rpython/jit/backend/x86/test/test_zrpy_releasegil.py
@@ -16,7 +16,7 @@
def define_simple(self):
class Glob:
def __init__(self):
- glob.event = 0
+ self.event = 0
glob = Glob()
#
diff --git a/rpython/rtyper/test/test_rptr.py b/rpython/rtyper/test/test_rptr.py
--- a/rpython/rtyper/test/test_rptr.py
+++ b/rpython/rtyper/test/test_rptr.py
@@ -336,6 +336,21 @@
res = interpret(f, [])
assert res == 1
+def test_interior_ptr_convert():
+ S = lltype.Struct("S", ("x", lltype.Signed))
+ T = lltype.GcArray(S)
+ def f(i):
+ t = lltype.malloc(T, 2)
+ if i:
+ x = t[0]
+ else:
+ x = t[1]
+ x.x = 3
+ return t[0].x
+
+ res = interpret(f, [13])
+ assert res == 3
+
def test_interior_ptr_with_field_and_index():
S = lltype.Struct("S", ('x', lltype.Signed))
T = lltype.GcStruct("T", ('items', lltype.Array(S)))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit