X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lua%2Fbase.cpkg;h=e7b91e4a432f0a6334ee532547d10f3eb41aa8f2;hp=f9b7304567007a22636d86a115d62f8f22013c38;hb=4956024f0d540c5dd689444113307fa7f9dd4067;hpb=2dc50decd320b310ef56c14041b6fa4fefd865ac diff --git a/lib-lua/base.cpkg b/lib-lua/base.cpkg index f9b7304..e7b91e4 100644 --- a/lib-lua/base.cpkg +++ b/lib-lua/base.cpkg @@ -4,10 +4,16 @@ .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, $$); - .push = lua_pushinteger($L, $$); + .push = luaM_pushquadopt($L, $$); }; @type string_t { @@ -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: */