diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-12-04 00:39:47 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-19 16:24:56 +0100 |
commit | 4160b50a0b4c51f8b7191928cdf38d9fb0147fe2 (patch) | |
tree | 996998b7fe506101c8d91aeb71891eaac358902e /lib/sqfs/win32 | |
parent | 42194bf57d470e548e03c44f5c2340d7d23a3ecb (diff) |
Add a helper function to initialize libsquashfs objects
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/win32')
-rw-r--r-- | lib/sqfs/win32/io_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqfs/win32/io_file.c b/lib/sqfs/win32/io_file.c index cfef296..548a246 100644 --- a/lib/sqfs/win32/io_file.c +++ b/lib/sqfs/win32/io_file.c @@ -187,6 +187,8 @@ sqfs_file_t *sqfs_open_file(const char *filename, sqfs_u32 flags) return NULL; } + sqfs_object_init(file, stdio_destroy, stdio_copy); + if (flags & SQFS_FILE_OPEN_READ_ONLY) { file->readonly = true; access_flags = GENERIC_READ; @@ -231,7 +233,5 @@ sqfs_file_t *sqfs_open_file(const char *filename, sqfs_u32 flags) base->write_at = stdio_write_at; base->get_size = stdio_get_size; base->truncate = stdio_truncate; - ((sqfs_object_t *)base)->destroy = stdio_destroy; - ((sqfs_object_t *)base)->copy = stdio_copy; return base; } |