Author: Armin Rigo <[email protected]>
Branch:
Changeset: r528:0b3f7830cb46
Date: 2013-09-11 21:46 +0200
http://bitbucket.org/pypy/stmgc/changeset/0b3f7830cb46/
Log: Support non-aligned keys in g2l_insert(), as needed for
stm_call_on_abort().
diff --git a/c4/lists.c b/c4/lists.c
--- a/c4/lists.c
+++ b/c4/lists.c
@@ -90,7 +90,6 @@
int shift = 0;
char *p = (char *)(g2l->toplevel.items);
char *entry;
- assert((key & (sizeof(void*)-1)) == 0); /* only for aligned keys */
while (1)
{
p += (key >> shift) & TREE_MASK;
diff --git a/c4/test/test_extra.py b/c4/test/test_extra.py
--- a/c4/test/test_extra.py
+++ b/c4/test/test_extra.py
@@ -292,7 +292,7 @@
if retry_counter == 0:
lib.stm_call_on_abort(p1, clear_me)
lib.stm_call_on_abort(p2, clear_me)
- lib.stm_call_on_abort(p3, clear_me)
+ lib.stm_call_on_abort(p3 + 1, clear_me)
lib.stm_call_on_abort(p2, ffi.NULL)
#
assert ffi.string(p0) == "aaa"
@@ -303,7 +303,7 @@
abort_and_retry()
else:
assert ffi.string(p1) == "iello"
- assert ffi.string(p3) == "xorld"
+ assert ffi.string(p3) == "wprld"
if retry_counter == 1:
# the registered callbacks are removed
# on abort
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit