aboutsummaryrefslogtreecommitdiffstats
path: root/src/luaevent.c
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-12-07 22:40:03 +0000
committerMatthew Wild <mwild1@gmail.com>2009-12-07 22:40:03 +0000
commit2506ebf1e52bdd83007b0463f0a02ea1d6062be8 (patch)
treebe6c199a551827310997c466ebd5c3bb4f7112bf /src/luaevent.c
parentbfd0058b760fb75ae466aa9049e9428645363a65 (diff)
downloadluaevent-prosody-2506ebf1e52bdd83007b0463f0a02ea1d6062be8.tar.gz
luaevent-prosody-2506ebf1e52bdd83007b0463f0a02ea1d6062be8.zip
Add core.libevent_version() function to get version of libevent in use
Diffstat (limited to 'src/luaevent.c')
-rw-r--r--src/luaevent.c6
1 files changed, 6 insertions, 0 deletions
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 }
};