diff options
author | Timo Teräs <timo.teras@iki.fi> | 2021-07-17 15:09:20 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-07-22 15:30:08 +0300 |
commit | 94c5e01038a819e8abd062ed81aec321cdff4aa3 (patch) | |
tree | ea420386ef62e67be935cd1dd3d167083abd13dd /src | |
parent | 3b00c0dc808f4b6c3809c91a67709ca2d7bf8865 (diff) | |
download | apk-tools-94c5e01038a819e8abd062ed81aec321cdff4aa3.tar.gz apk-tools-94c5e01038a819e8abd062ed81aec321cdff4aa3.tar.bz2 apk-tools-94c5e01038a819e8abd062ed81aec321cdff4aa3.tar.xz apk-tools-94c5e01038a819e8abd062ed81aec321cdff4aa3.zip |
adb: remove the now unused get_default_int() hook
It is no longer needed, and can be later reintroduced if needed.
Diffstat (limited to 'src')
-rw-r--r-- | src/adb.c | 8 | ||||
-rw-r--r-- | src/adb.h | 1 |
2 files changed, 1 insertions, 8 deletions
@@ -384,10 +384,7 @@ adb_val_t adb_ro_val(const struct adb_obj *o, unsigned i) uint32_t adb_ro_int(const struct adb_obj *o, unsigned i) { - adb_val_t val = adb_ro_val(o, i); - if (val == ADB_NULL && o->schema && o->schema->get_default_int) - return o->schema->get_default_int(i); - return adb_r_int(o->db, val); + return adb_r_int(o->db, adb_ro_val(o, i)); } apk_blob_t adb_ro_blob(const struct adb_obj *o, unsigned i) @@ -826,9 +823,6 @@ adb_val_t adb_wo_val_fromstring(struct adb_obj *o, unsigned i, apk_blob_t val) adb_val_t adb_wo_int(struct adb_obj *o, unsigned i, uint32_t v) { - if (o->schema && o->schema->get_default_int && - v == o->schema->get_default_int(i)) - return ADB_NULL; return adb_wo_val(o, i, adb_w_int(o->db, v)); } @@ -102,7 +102,6 @@ struct adb_object_schema { apk_blob_t (*tostring)(struct adb_obj *, char *, size_t); int (*fromstring)(struct adb_obj *, apk_blob_t); - uint32_t (*get_default_int)(unsigned i); int (*compare)(const struct adb_obj *, const struct adb_obj *); void (*pre_commit)(struct adb_obj *); |