aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/luaevent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/luaevent.c b/src/luaevent.c
index 550a386..0c5c37b 100644
--- a/src/luaevent.c
+++ b/src/luaevent.c
@@ -99,10 +99,17 @@ static int luaevent_loopexit(lua_State*L) {
return 1;
}
+static int luaevent_method(lua_State* L) {
+ le_base *base = event_base_get(L, 1);
+ lua_pushstring(L, event_base_get_method(base->base));
+ return 1;
+}
+
static luaL_Reg base_funcs[] = {
{ "addevent", luaevent_addevent },
{ "loop", luaevent_loop },
{ "loopexit", luaevent_loopexit },
+ { "method", luaevent_method },
{ NULL, NULL }
};