summaryrefslogtreecommitdiff
path: root/src/fetch.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-06-21 16:07:58 +0300
committerTimo Teräs <timo.teras@iki.fi>2017-06-23 10:07:44 +0300
commit4d9c0c39b033159f4bd6fe279dd38d4f4a67c904 (patch)
treeb316100ea8a03be653c8cb0c729577c24ebcae14 /src/fetch.c
parentca9d476ba39d75b9a197f9ae30e5efe2ebafaf3c (diff)
downloadapk-tools-4d9c0c39b033159f4bd6fe279dd38d4f4a67c904.tar.gz
apk-tools-4d9c0c39b033159f4bd6fe279dd38d4f4a67c904.tar.bz2
apk-tools-4d9c0c39b033159f4bd6fe279dd38d4f4a67c904.tar.xz
apk-tools-4d9c0c39b033159f4bd6fe279dd38d4f4a67c904.zip
io: make io vtables const struct, and add accessors for them
This reduces function pointers in heap, and unifies how the io functions are called.
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 847146f..bb2efa9 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -178,11 +178,11 @@ static int fetch_package(apk_hash_item item, void *pctx)
r = apk_istream_splice(is, fd, pkg->size, progress_cb, ctx);
if (fd != STDOUT_FILENO) {
struct apk_file_meta meta;
- is->get_meta(is, &meta);
+ apk_istream_get_meta(is, &meta);
apk_file_meta_to_fd(fd, &meta);
close(fd);
}
- is->close(is);
+ apk_istream_close(is);
if (r != pkg->size) {
unlinkat(ctx->outdir_fd, filename, 0);