f9b7304567007a22636d86a115d62f8f22013c38
[apps/madmutt.git] / lib-lua / base.cpkg
1 @type bool {
2     .ctype = unsigned : 1;
3     .check = (luaL_checkinteger($L, $$) != 0);
4     .push  = lua_pushboolean($L, $$);
5 };
6
7 @type quadopt_t {
8     .ctype = unsigned : 2;
9     .check = luaM_checkquadopt($L, $$);
10     .push  = lua_pushinteger($L, $$);
11 };
12
13 @type string_t {
14     .ctype = char *;
15     .check = luaL_checkstring($L, $$);
16     .push  = lua_pushstring($L, $$);
17     .ctor  = m_strdup($$);
18     .dtor  = p_delete($$);
19 };
20
21 @type path_t : string_t {
22     .ctor  = luaM_pathnew($$);
23 };
24
25 @type rx_t {
26     .ctype = rx_t *;
27     .check = luaM_checkrx($L, $$);
28     .push  = lua_pushstring($L, $$ ? ($$)->pattern : NULL);
29     .ctor  = luaM_rxnew($$);
30     .dtor  = rx_delete($$);
31 };
32
33 /* vim:set ft=c: */