Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r76406:e4bdd177ed03
Date: 2015-03-16 16:26 +0100
http://bitbucket.org/pypy/pypy/changeset/e4bdd177ed03/
Log: Oops, bad move: reading the ll_raw_hashtable field of HASHTABLE_OBJ
would be done with a stm_read(), even though it is immutable.
Should fix test_hashtable_populate.
diff --git a/rpython/rlib/rstm.py b/rpython/rlib/rstm.py
--- a/rpython/rlib/rstm.py
+++ b/rpython/rlib/rstm.py
@@ -244,6 +244,7 @@
_HASHTABLE_OBJ = lltype.GcStruct('HASHTABLE_OBJ',
('ll_raw_hashtable', _STM_HASHTABLE_P),
+ hints={'immutable': True},
rtti=True,
adtmeths={'get': _ll_hashtable_get,
'set': _ll_hashtable_set,
@@ -282,8 +283,7 @@
p = lltype.malloc(_STM_HASHTABLE_ENTRY)
else:
p = lltype.nullptr(_STM_HASHTABLE_ENTRY)
- h = lltype.malloc(_HASHTABLE_OBJ)
- h.ll_raw_hashtable = lltype.nullptr(_STM_HASHTABLE_P.TO)
+ h = lltype.malloc(_HASHTABLE_OBJ, zero=True)
h.ll_raw_hashtable = llop.stm_hashtable_create(_STM_HASHTABLE_P, p)
return h
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit