Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch: json-decoder-maps
Changeset: r97565:42f36c45bad2
Date: 2019-09-20 12:31 +0200
http://bitbucket.org/pypy/pypy/changeset/42f36c45bad2/

Log:    remove usage of get_nonmovingbuffer_final_null

diff --git a/pypy/module/_pypyjson/interp_decoder.py 
b/pypy/module/_pypyjson/interp_decoder.py
--- a/pypy/module/_pypyjson/interp_decoder.py
+++ b/pypy/module/_pypyjson/interp_decoder.py
@@ -80,7 +80,7 @@
         # 1) we automatically get the '\0' sentinel at the end of the string,
         #    which means that we never have to check for the "end of string"
         # 2) we can pass the buffer directly to strtod
-        self.ll_chars, self.flag = rffi.get_nonmovingbuffer_final_null(self.s)
+        self.ll_chars, self.llobj, self.flag = 
rffi.get_nonmovingbuffer_ll_final_null(self.s)
         self.end_ptr = lltype.malloc(rffi.CCHARPP.TO, 1, flavor='raw')
         self.pos = 0
         self.intcache = space.fromcache(IntCache)
@@ -111,7 +111,7 @@
 
 
     def close(self):
-        rffi.free_nonmovingbuffer(self.s, self.ll_chars, self.flag)
+        rffi.free_nonmovingbuffer_ll(self.ll_chars, self.llobj, self.flag)
         lltype.free(self.end_ptr, flavor='raw')
         # clean up objects that are instances of now blocked maps
         for w_obj in self.unclear_objects:
diff --git a/pypy/module/_pypyjson/test/test_simd.py 
b/pypy/module/_pypyjson/test/test_simd.py
--- a/pypy/module/_pypyjson/test/test_simd.py
+++ b/pypy/module/_pypyjson/test/test_simd.py
@@ -24,19 +24,19 @@
 
 def string_to_word(s):
     assert len(s) == WORD_SIZE
-    ll_chars, flag = rffi.get_nonmovingbuffer_final_null(s)
+    ll_chars, llobj, flag = rffi.get_nonmovingbuffer_ll_final_null(s)
     try:
         wordarray = rffi.cast(rffi.ULONGP, ll_chars)
         return wordarray[0]
     finally:
-        rffi.free_nonmovingbuffer(s, ll_chars, flag)
+        rffi.free_nonmovingbuffer_ll(ll_chars, llobj, flag)
 
 def ll(callable, string, *args):
-    ll_chars, flag = rffi.get_nonmovingbuffer_final_null(string)
+    ll_chars, llobj, flag = rffi.get_nonmovingbuffer_ll_final_null(string)
     try:
         return callable(ll_chars, *args)
     finally:
-        rffi.free_nonmovingbuffer(string, ll_chars, flag)
+        rffi.free_nonmovingbuffer_ll(ll_chars, llobj, flag)
 
 word = strategies.builds(
     r_uint, strategies.integers(min_value=-sys.maxint-1, max_value=sys.maxint))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to