Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1619:19bb1dde7aca
Date: 2015-02-13 16:38 +0100
http://bitbucket.org/pypy/stmgc/changeset/19bb1dde7aca/

Log:    tweak

diff --git a/c7/stm/gcpage.c b/c7/stm/gcpage.c
--- a/c7/stm/gcpage.c
+++ b/c7/stm/gcpage.c
@@ -128,10 +128,8 @@
 }
 
 object_t *stm_allocate_preexisting(ssize_t size_rounded_up,
-                                   struct object_s *initial_data)
+                                   const char *initial_data)
 {
-    initial_data->stm_flags = GCFLAG_WRITE_BARRIER;
-
     acquire_privatization_lock();
 
     char *p = allocate_outside_nursery_large(size_rounded_up);
@@ -140,6 +138,7 @@
     for (j = 0; j <= NB_SEGMENTS; j++) {
         char *dest = get_segment_base(j) + nobj;
         memcpy(dest, initial_data, size_rounded_up);
+        ((struct object_s *)dest)->stm_flags = GCFLAG_WRITE_BARRIER;
     }
 
     release_privatization_lock();
diff --git a/c7/stm/hashtable.c b/c7/stm/hashtable.c
--- a/c7/stm/hashtable.c
+++ b/c7/stm/hashtable.c
@@ -304,7 +304,7 @@
             };
             entry = (stm_hashtable_entry_t *)
                 stm_allocate_preexisting(sizeof(stm_hashtable_entry_t),
-                                         &initial.header);
+                                         (char *)&initial.header);
             hashtable->additions += 0x100;
         }
         table->items[i] = entry;
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -570,7 +570,7 @@
    use stm_write() and make local changes.
 */
 object_t *stm_allocate_preexisting(ssize_t size_rounded_up,
-                                   struct object_s *initial_data);
+                                   const char *initial_data);
 
 /* ==================== END ==================== */
 
diff --git a/c7/test/support.py b/c7/test/support.py
--- a/c7/test/support.py
+++ b/c7/test/support.py
@@ -185,7 +185,7 @@
 uintptr_t _get_entry_index(stm_hashtable_entry_t *entry);
 object_t *_get_entry_object(stm_hashtable_entry_t *entry);
 
-object_t *stm_allocate_preexisting(ssize_t size_rounded_up, struct object_s *);
+object_t *stm_allocate_preexisting(ssize_t size_rounded_up, const char *);
 """)
 
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to