summaryrefslogtreecommitdiff
path: root/src/apk.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:01:05 +0300
commitec0aae117bff7f8c1a667d3e5ee9d45c2ab68be8 (patch)
tree542f5fa111650bcde62cc62f61ab65a7e3fc6e5e /src/apk.c
parent430b950d6a164010a1d6ace5c6e0e5e3cdeed68c (diff)
downloadapk-tools-ec0aae117bff7f8c1a667d3e5ee9d45c2ab68be8.tar.gz
apk-tools-ec0aae117bff7f8c1a667d3e5ee9d45c2ab68be8.tar.bz2
apk-tools-ec0aae117bff7f8c1a667d3e5ee9d45c2ab68be8.tar.xz
apk-tools-ec0aae117bff7f8c1a667d3e5ee9d45c2ab68be8.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. (cherry picked from commit 09ca58863af02d11e8dbf066b714464fb1638e6f)
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/apk.c b/src/apk.c
index c990102..6cd4a5a 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -548,7 +548,7 @@ int main(int argc, char **argv)
struct apk_bstream *bs = apk_bstream_from_file(AT_FDCWD, test_installed_db);
if (!IS_ERR_OR_NULL(bs)) {
apk_db_index_read(&db, bs, -1);
- bs->close(bs, NULL);
+ apk_bstream_close(bs, NULL);
}
}
for (i = 0; i < test_repos->num; i++) {
@@ -576,7 +576,7 @@ int main(int argc, char **argv)
}
apk_db_index_read(&db, bs, repo);
- bs->close(bs, NULL);
+ apk_bstream_close(bs, NULL);
if (repo != -2) {
if (!(apk_flags & APK_NO_NETWORK))
db.available_repos |= BIT(repo);