summaryrefslogtreecommitdiffstats
path: root/cython/afc.pxi
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-03-20 22:56:33 +0100
committerGravatar Martin Szulecki2012-03-20 23:25:56 +0100
commit2d9ecc3d805e616b2bf85c0b8e99737e9b30c89d (patch)
tree48e924795c6bf3c217de61efe6048f6bb6573244 /cython/afc.pxi
parent3e9d17ccd5212c110db9cfb5daa2d889d0a1aee4 (diff)
downloadlibimobiledevice-2d9ecc3d805e616b2bf85c0b8e99737e9b30c89d.tar.gz
libimobiledevice-2d9ecc3d805e616b2bf85c0b8e99737e9b30c89d.tar.bz2
cython: Update to latest API and fix deprecation warnings with cython 0.13+
Diffstat (limited to 'cython/afc.pxi')
-rw-r--r--cython/afc.pxi18
1 files changed, 9 insertions, 9 deletions
diff --git a/cython/afc.pxi b/cython/afc.pxi
index c33dbfd..cf72b69 100644
--- a/cython/afc.pxi
+++ b/cython/afc.pxi
@@ -142,7 +142,7 @@ cdef class AfcFile(Base):
except BaseError, e:
raise
finally:
- stdlib.free(c_data)
+ free(c_data)
return bytes_written
@@ -182,9 +182,9 @@ cdef class AfcClient(BaseService):
while infos[i]:
info = infos[i]
result.append(info)
- stdlib.free(infos[i])
+ free(infos[i])
i = i + 1
- stdlib.free(infos)
+ free(infos)
return result
@@ -205,13 +205,13 @@ cdef class AfcClient(BaseService):
while dir_list[i]:
f = dir_list[i]
result.append(f)
- stdlib.free(dir_list[i])
+ free(dir_list[i])
i = i + 1
- stdlib.free(dir_list)
+ free(dir_list)
return result
- cpdef AfcFile open(self, bytes filename, bytes mode='r'):
+ cpdef AfcFile open(self, bytes filename, bytes mode=b'r'):
cdef:
afc_file_mode_t c_mode
uint64_t handle
@@ -241,7 +241,7 @@ cdef class AfcClient(BaseService):
cpdef get_file_info(self, bytes path):
cdef:
- list result
+ list result = []
char** c_result
int i = 0
bytes info
@@ -254,9 +254,9 @@ cdef class AfcClient(BaseService):
while c_result[i]:
info = c_result[i]
result.append(info)
- stdlib.free(c_result[i])
+ free(c_result[i])
i = i + 1
- stdlib.free(c_result)
+ free(c_result)
return result