From fde9ad1782dd4ddb28c428b488e0278471a91c90 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Sat, 19 Feb 2011 04:25:05 +0000 Subject: lua: init fixes - call apk_atom_init() - if no open flag is specified, then default to read-only. --- src/lua-apk.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/lua-apk.c b/src/lua-apk.c index 7a04dc6..835d379 100644 --- a/src/lua-apk.c +++ b/src/lua-apk.c @@ -145,8 +145,11 @@ static int Papk_db_open(lua_State *L) memset(&opts, 0, sizeof(opts)); list_init(&opts.repository_list); + apk_atom_init(); if (lua_istable(L, 1)) get_dbopts(L, 1, &opts); + else + opts.open_flags |= APK_OPENF_READ; db = lua_newuserdata(L, sizeof(struct apk_database)); luaL_getmetatable(L, APKDB_META); -- cgit v1.2.3