summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-20 12:43:12 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-20 12:46:13 +0000
commitbd0242e1de1c21d4d58cfd86e98b223b6e3e7e12 (patch)
tree928a229223f04dbaa5982331d4cb5361640c9369
parent7622ccf49fb91f56a3e7212473de7fc94ad706a8 (diff)
downloadapk-tools-bd0242e1de1c21d4d58cfd86e98b223b6e3e7e12.tar.gz
apk-tools-bd0242e1de1c21d4d58cfd86e98b223b6e3e7e12.tar.bz2
apk-tools-bd0242e1de1c21d4d58cfd86e98b223b6e3e7e12.tar.xz
apk-tools-bd0242e1de1c21d4d58cfd86e98b223b6e3e7e12.zip
lua: adapt to new API
Use new apk_blob_pull_dep instead of the old apk_dep_from_blob
-rw-r--r--src/lua-apk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lua-apk.c b/src/lua-apk.c
index 845d67a..e41e785 100644
--- a/src/lua-apk.c
+++ b/src/lua-apk.c
@@ -204,10 +204,11 @@ static int Papk_exists(lua_State *L)
struct apk_dependency dep;
struct apk_name *name;
struct apk_package *pkg;
- int i, r;
+ int i;
+ apk_blob_t blob = APK_BLOB_STR(depstr);
+ apk_blob_pull_dep(&blob, db, &dep);
- r = apk_dep_from_blob(&dep, db, APK_BLOB_STR(depstr));
- if (r != 0)
+ if (APK_BLOB_IS_NULL(blob))
goto ret_nil;
name = dep.name;