Author: Armin Rigo <ar...@tunes.org>
Branch: stmgc-c8
Changeset: r78280:8d2fbff1bf9e
Date: 2015-06-24 09:41 +0200
http://bitbucket.org/pypy/pypy/changeset/8d2fbff1bf9e/

Log:    Forgot that arrays can also be 'stm_dont_track_raw_accesses'

diff --git a/pypy/module/pypystm/unsafe_op.py b/pypy/module/pypystm/unsafe_op.py
--- a/pypy/module/pypystm/unsafe_op.py
+++ b/pypy/module/pypystm/unsafe_op.py
@@ -7,9 +7,9 @@
 
 @specialize.memo()
 def get_unsafe_type_ptr(TP):
-    UNSAFE = lltype.Struct('UNSAFE', ('x', TP),
-                           hints = {'stm_dont_track_raw_accesses': True})
-    return rffi.CArrayPtr(UNSAFE)
+    UNSAFE = lltype.Array(TP, hints={'nolength': True,
+                                     'stm_dont_track_raw_accesses': True})
+    return lltype.Ptr(UNSAFE)
 
 
 def unsafe_write_raw_signed_data(w_cdata, index, source, size):
@@ -17,7 +17,7 @@
         for TP, _ in misc._prim_signed_types:
             if size == rffi.sizeof(TP):
                 TPP = get_unsafe_type_ptr(TP)
-                rffi.cast(TPP, target)[index].x = rffi.cast(TP, source)
+                rffi.cast(TPP, target)[index] = rffi.cast(TP, source)
                 return
     raise NotImplementedError("bad integer size")
 
@@ -26,7 +26,7 @@
         for TP, _ in misc._prim_unsigned_types:
             if size == rffi.sizeof(TP):
                 TPP = get_unsafe_type_ptr(TP)
-                rffi.cast(TPP, target)[index].x = rffi.cast(TP, source)
+                rffi.cast(TPP, target)[index] = rffi.cast(TP, source)
                 return
     raise NotImplementedError("bad integer size")
 
@@ -35,7 +35,7 @@
         for TP, _ in misc._prim_float_types:
             if size == rffi.sizeof(TP):
                 TPP = get_unsafe_type_ptr(TP)
-                rffi.cast(TPP, target)[index].x = rffi.cast(TP, source)
+                rffi.cast(TPP, target)[index] = rffi.cast(TP, source)
                 return
     raise NotImplementedError("bad float size")
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to