Commits

wlav committed f19f98d Merge

merge fix for memcpy into branch

Comments (0)

Files changed (2)

rpython/rtyper/lltypesystem/rffi.py

 c_memcpy = llexternal("memcpy",
             [VOIDP, VOIDP, SIZE_T],
             lltype.Void,
-            _nowrapper=True, releasegil=False
+            releasegil=False
         )
-

rpython/rtyper/lltypesystem/test/test_rffi.py

         assert cast(LONG, x) == 65535
     else:
         assert cast(LONG, cast(INT, x)) == -1
+
+def test_c_memcpy():
+    p1 = str2charp("hello")
+    p2 = str2charp("WORLD")
+    c_memcpy(cast(VOIDP, p2), cast(VOIDP, p1), 3)
+    assert charp2str(p1) == "hello"
+    assert charp2str(p2) == "helLD"
+    free_charp(p1)
+    free_charp(p2)