diff options
| author | 2012-03-20 22:56:33 +0100 | |
|---|---|---|
| committer | 2012-03-20 23:25:56 +0100 | |
| commit | 2d9ecc3d805e616b2bf85c0b8e99737e9b30c89d (patch) | |
| tree | 48e924795c6bf3c217de61efe6048f6bb6573244 /cython/afc.pxi | |
| parent | 3e9d17ccd5212c110db9cfb5daa2d889d0a1aee4 (diff) | |
| download | libimobiledevice-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.pxi | 18 |
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): | |||
| 142 | except BaseError, e: | 142 | except BaseError, e: |
| 143 | raise | 143 | raise |
| 144 | finally: | 144 | finally: |
| 145 | stdlib.free(c_data) | 145 | free(c_data) |
| 146 | 146 | ||
| 147 | return bytes_written | 147 | return bytes_written |
| 148 | 148 | ||
| @@ -182,9 +182,9 @@ cdef class AfcClient(BaseService): | |||
| 182 | while infos[i]: | 182 | while infos[i]: |
| 183 | info = infos[i] | 183 | info = infos[i] |
| 184 | result.append(info) | 184 | result.append(info) |
| 185 | stdlib.free(infos[i]) | 185 | free(infos[i]) |
| 186 | i = i + 1 | 186 | i = i + 1 |
| 187 | stdlib.free(infos) | 187 | free(infos) |
| 188 | 188 | ||
| 189 | return result | 189 | return result |
| 190 | 190 | ||
| @@ -205,13 +205,13 @@ cdef class AfcClient(BaseService): | |||
| 205 | while dir_list[i]: | 205 | while dir_list[i]: |
| 206 | f = dir_list[i] | 206 | f = dir_list[i] |
| 207 | result.append(f) | 207 | result.append(f) |
| 208 | stdlib.free(dir_list[i]) | 208 | free(dir_list[i]) |
| 209 | i = i + 1 | 209 | i = i + 1 |
| 210 | stdlib.free(dir_list) | 210 | free(dir_list) |
| 211 | 211 | ||
| 212 | return result | 212 | return result |
| 213 | 213 | ||
| 214 | cpdef AfcFile open(self, bytes filename, bytes mode='r'): | 214 | cpdef AfcFile open(self, bytes filename, bytes mode=b'r'): |
| 215 | cdef: | 215 | cdef: |
| 216 | afc_file_mode_t c_mode | 216 | afc_file_mode_t c_mode |
| 217 | uint64_t handle | 217 | uint64_t handle |
| @@ -241,7 +241,7 @@ cdef class AfcClient(BaseService): | |||
| 241 | 241 | ||
| 242 | cpdef get_file_info(self, bytes path): | 242 | cpdef get_file_info(self, bytes path): |
| 243 | cdef: | 243 | cdef: |
| 244 | list result | 244 | list result = [] |
| 245 | char** c_result | 245 | char** c_result |
| 246 | int i = 0 | 246 | int i = 0 |
| 247 | bytes info | 247 | bytes info |
| @@ -254,9 +254,9 @@ cdef class AfcClient(BaseService): | |||
| 254 | while c_result[i]: | 254 | while c_result[i]: |
| 255 | info = c_result[i] | 255 | info = c_result[i] |
| 256 | result.append(info) | 256 | result.append(info) |
| 257 | stdlib.free(c_result[i]) | 257 | free(c_result[i]) |
| 258 | i = i + 1 | 258 | i = i + 1 |
| 259 | stdlib.free(c_result) | 259 | free(c_result) |
| 260 | 260 | ||
| 261 | return result | 261 | return result |
| 262 | 262 | ||
