Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: py3k
Changeset: r86176:b1def8b63787
Date: 2016-08-12 17:58 +0100
http://bitbucket.org/pypy/pypy/changeset/b1def8b63787/

Log:    Fix translation

diff --git a/pypy/module/_cffi_backend/ctypeptr.py 
b/pypy/module/_cffi_backend/ctypeptr.py
--- a/pypy/module/_cffi_backend/ctypeptr.py
+++ b/pypy/module/_cffi_backend/ctypeptr.py
@@ -267,7 +267,7 @@
         space = self.space
         if self.accept_str and space.isinstance_w(w_init, space.w_str):
             # special case to optimize strings passed to a "char *" argument
-            value = w_init.str_w(space)
+            value = space.bytes_w(w_init)
             keepalives[i] = value
             buf, buf_flag = rffi.get_nonmovingbuffer_final_null(value)
             rffi.cast(rffi.CCHARPP, cdata)[0] = buf
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to