X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lua%2Fbase.cpkg;h=e7b91e4a432f0a6334ee532547d10f3eb41aa8f2;hp=221e2a0e3c6753228a5229e54eb8e0150b34fedb;hb=20e55d4252ca2db1fc2b1099acf8393c22903575;hpb=1681dff7a1b69b0dad31d515c466439548b71f94 diff --git a/lib-lua/base.cpkg b/lib-lua/base.cpkg index 221e2a0..e7b91e4 100644 --- a/lib-lua/base.cpkg +++ b/lib-lua/base.cpkg @@ -4,6 +4,12 @@ .push = lua_pushboolean($L, $$); }; +@type int { + .ctype = int; + .check = luaL_checkinteger($L, $$); + .push = lua_pushinteger($L, $$); +}; + @type quadopt_t { .ctype = unsigned : 2; .check = luaM_checkquadopt($L, $$); @@ -30,4 +36,12 @@ .dtor = rx_delete($$); }; +@type address_t { + .ctype = address_t *; + .check = luaL_checkstring($L, $$); + .push = luaM_pushaddr($L, $$); + .ctor = rfc822_parse_adrlist(NULL, $$); + .dtor = address_list_wipe($$); +}; + /* vim:set ft=c: */