libimobiledevice: PyString_AsString -> PyBytes_AsString

This commit is contained in:
Ray Donnelly
2015-07-23 00:20:20 +01:00
parent d96dfae53d
commit ee60f2fc10
2 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
diff -urN libimobiledevice-1.2.0.orig/cython/debugserver.pxi libimobiledevice-1.2.0/cython/debugserver.pxi
--- libimobiledevice-1.2.0.orig/cython/debugserver.pxi 2015-07-22 22:43:52.357279900 +0100
+++ libimobiledevice-1.2.0/cython/debugserver.pxi 2015-07-22 22:44:40.303768000 +0100
@@ -44,13 +44,13 @@
# from http://stackoverflow.com/a/17511714
-from cpython.string cimport PyString_AsString
+from cpython.bytes cimport PyBytes_AsString
cdef char ** to_cstring_array(list_str):
if not list_str:
return NULL
cdef char **ret = <char **>malloc(len(list_str) * sizeof(char *))
for i in xrange(len(list_str)):
- ret[i] = PyString_AsString(list_str[i])
+ ret[i] = PyBytes_AsString(list_str[i])
return ret