Skip to content

Commit ef95531

Browse files
authored
fix the other call to read_set_seek_callback
1 parent 89a4b84 commit ef95531

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libarchive/read.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ def custom_reader(
6565
open_cb = OPEN_CALLBACK(open_func) if open_func else NO_OPEN_CB
6666
read_cb = READ_CALLBACK(read_func)
6767
close_cb = CLOSE_CALLBACK(close_func) if close_func else NO_CLOSE_CB
68+
seek_cb = SEEK_CALLBACK(seek_func)
6869
with new_archive_read(format_name, filter_name, passphrase) as archive_p:
6970
if seek_func:
70-
ffi.read_set_seek_callback(archive_p, SEEK_CALLBACK(seek_func))
71+
ffi.read_set_seek_callback(archive_p, seek_cb)
7172
ffi.read_open(archive_p, None, open_cb, read_cb, close_cb)
7273
yield archive_read_class(archive_p)
7374

0 commit comments

Comments
 (0)