From 2506ebf1e52bdd83007b0463f0a02ea1d6062be8 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 7 Dec 2009 22:40:03 +0000 Subject: Add core.libevent_version() function to get version of libevent in use --- src/luaevent.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/luaevent.c b/src/luaevent.c index 0c5c37b..8a682df 100644 --- a/src/luaevent.c +++ b/src/luaevent.c @@ -29,6 +29,11 @@ int luaevent_newbase(lua_State* L) { return 1; } +int luaevent_libevent_version(lua_State* L) { + lua_pushstring(L, event_get_version()); + return 1; +} + static int luaevent_base_gc(lua_State* L) { le_base *base = event_base_get(L, 1); if(base->base) { @@ -115,6 +120,7 @@ static luaL_Reg base_funcs[] = { static luaL_Reg funcs[] = { { "new", luaevent_newbase }, + { "libevent_version", luaevent_libevent_version }, { NULL, NULL } }; -- cgit v1.2.3