summaryrefslogtreecommitdiff
path: root/src/app_mkndx.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-09-03 13:44:48 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-09-03 13:44:48 +0300
commitfd42c073bf77d37562851ae84cfce1a3a5feb818 (patch)
tree8345723e39a2fba07f7d20e520bd6530b883d0ed /src/app_mkndx.c
parentbd156836703e52166c282a0fea50a45498cfabdd (diff)
downloadapk-tools-fd42c073bf77d37562851ae84cfce1a3a5feb818.tar.gz
apk-tools-fd42c073bf77d37562851ae84cfce1a3a5feb818.tar.bz2
apk-tools-fd42c073bf77d37562851ae84cfce1a3a5feb818.tar.xz
apk-tools-fd42c073bf77d37562851ae84cfce1a3a5feb818.zip
extract: pass root object instead of database
Diffstat (limited to 'src/app_mkndx.c')
-rw-r--r--src/app_mkndx.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/app_mkndx.c b/src/app_mkndx.c
index b26c2ff..a68e18b 100644
--- a/src/app_mkndx.c
+++ b/src/app_mkndx.c
@@ -176,15 +176,13 @@ static int mkndx_parse_v2meta(struct apk_extract_ctx *ectx, struct apk_istream *
return 0;
}
-static int mkndx_parse_v3meta(struct apk_extract_ctx *ectx, struct adb *db)
+static int mkndx_parse_v3meta(struct apk_extract_ctx *ectx, struct adb_obj *pkg)
{
struct mkndx_ctx *ctx = container_of(ectx, struct mkndx_ctx, ectx);
- struct adb_obj obj;
-
- adb_r_rootobj(db, &obj, &schema_package);
+ struct adb *db = pkg->db;
adb_val_t o = adb_wa_append(&ctx->pkgs,
- adb_w_copy(&ctx->db, db, adb_ro_val(&obj, ADBI_PKG_PKGINFO)));
+ adb_w_copy(&ctx->db, db, adb_ro_val(pkg, ADBI_PKG_PKGINFO)));
if (ADB_IS_ERROR(o)) return -ADB_VAL_VALUE(o);
return 0;
}