Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r69891:08d0f40dfe46
Date: 2014-03-12 09:47 +0100
http://bitbucket.org/pypy/pypy/changeset/08d0f40dfe46/

Log:    Fix (stm/test/test_ztranslated, test_dtoa)

diff --git a/rpython/rtyper/lltypesystem/rstr.py 
b/rpython/rtyper/lltypesystem/rstr.py
--- a/rpython/rtyper/lltypesystem/rstr.py
+++ b/rpython/rtyper/lltypesystem/rstr.py
@@ -130,6 +130,14 @@
     def copy_raw_to_string(ptrsrc, dst, dststart, length):
         # xxx Warning: same note as above apply: don't do this at home
         assert length >= 0
+
+        if rgc.stm_is_enabled():
+            i = 0
+            while i < length:
+                dst.chars[dststart + i] = ptrsrc[i]
+                i += 1
+            return
+
         # from here, no GC operations can happen
         dst = _get_raw_buf(SRC_TP, dst, dststart)
         adr = llmemory.cast_ptr_to_adr(ptrsrc)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to