Skip to content

Commit

Permalink
libimobiledevice: PyString_AsString -> PyBytes_AsString
Browse files Browse the repository at this point in the history
  • Loading branch information
mingwandroid committed Jul 22, 2015
1 parent d96dfae commit ee60f2f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
@@ -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


7 changes: 5 additions & 2 deletions mingw-w64-libimobiledevice/PKGBUILD
Expand Up @@ -10,16 +10,19 @@ url='http://www.libimobiledevice.org/'
license=('GPL2+')
options=('staticlibs')
source=("http://www.libimobiledevice.org/downloads/${_realname}-${pkgver}.tar.bz2"
001-cython-includes.patch)
001-cython-includes.patch
0002-PyString_AsString-now-PyBytes_AsString.patch)
depends=("${MINGW_PACKAGE_PREFIX}-libusbmuxd"
"${MINGW_PACKAGE_PREFIX}-libplist"
"${MINGW_PACKAGE_PREFIX}-openssl")
sha1sums=('a8e3f21180b1d6df754d04a4080a29cf6891e701'
'9d091cf73ce1477db7b78fc8e47572e2e3031e79')
'9d091cf73ce1477db7b78fc8e47572e2e3031e79'
'e54edd0b3b061ac8531c03b13a6b9336b5927a20')

prepare() {
cd ${srcdir}/${_realname}-${pkgver}
patch -p1 -i ${srcdir}/001-cython-includes.patch
patch -p1 -i ${srcdir}/0002-PyString_AsString-now-PyBytes_AsString.patch

autoreconf -fiv
}
Expand Down

0 comments on commit ee60f2f

Please sign in to comment.