Author: Remi Meier <[email protected]>
Branch: implement-id
Changeset: r226:98c1eebad13c
Date: 2013-06-21 14:18 +0200
http://bitbucket.org/pypy/stmgc/changeset/98c1eebad13c/
Log: fix tests and remove some of the assert(0), as they at least seem to
be hit in tests
diff --git a/c4/steal.c b/c4/steal.c
--- a/c4/steal.c
+++ b/c4/steal.c
@@ -84,15 +84,12 @@
stub->h_revision = ((revision_t)obj) | 2;
if (obj->h_original) {
stub->h_original = obj->h_original;
- assert(0);
}
else if (obj->h_tid & GCFLAG_OLD) {
stub->h_original = (revision_t)obj;
- assert(0);
}
else {
obj->h_original = (revision_t)stub;
- assert(0);
}
g2l_insert(&sd->all_stubs, obj, stub);
diff --git a/c4/test/support.py b/c4/test/support.py
--- a/c4/test/support.py
+++ b/c4/test/support.py
@@ -32,6 +32,7 @@
typedef struct stm_object_s {
revision_t h_tid;
revision_t h_revision;
+ revision_t h_original;
} *gcptr;
int gettid(gcptr);
diff --git a/c4/test/test_gcpage.py b/c4/test/test_gcpage.py
--- a/c4/test/test_gcpage.py
+++ b/c4/test/test_gcpage.py
@@ -12,7 +12,7 @@
def test_HDR():
import struct
- assert HDR == struct.calcsize("PP")
+ assert HDR == struct.calcsize("PPP")
def test_malloc_simple():
assert count_pages() == 0
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit