aboutsummaryrefslogtreecommitdiff
path: root/src/auxiliar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auxiliar.c')
-rw-r--r--src/auxiliar.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/auxiliar.c b/src/auxiliar.c
index 4b3a0f6..6888f9c 100644
--- a/src/auxiliar.c
+++ b/src/auxiliar.c
@@ -66,26 +66,6 @@ int aux_checkboolean(lua_State *L, int objidx)
66} 66}
67 67
68/*-------------------------------------------------------------------------*\ 68/*-------------------------------------------------------------------------*\
69* Calls appropriate option handler
70\*-------------------------------------------------------------------------*/
71int aux_meth_setoption(lua_State *L, luaL_reg *opt)
72{
73 const char *name = luaL_checkstring(L, 2); /* obj, name, args */
74 while (opt->name && strcmp(name, opt->name))
75 opt++;
76 if (!opt->func) {
77 char msg[45];
78 sprintf(msg, "unknown option `%.35s'", name);
79 luaL_argerror(L, 2, msg);
80 }
81 lua_remove(L, 2); /* obj, args */
82 lua_pushcfunction(L, opt->func); /* obj, args, func */
83 lua_insert(L, 1); /* func, obj, args */
84 lua_call(L, lua_gettop(L)-1, LUA_MULTRET);
85 return lua_gettop(L);
86}
87
88/*-------------------------------------------------------------------------*\
89* Return userdata pointer if object belongs to a given class, abort with 69* Return userdata pointer if object belongs to a given class, abort with
90* error otherwise 70* error otherwise
91\*-------------------------------------------------------------------------*/ 71\*-------------------------------------------------------------------------*/