aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2007-09-05 22:38:28 -0400
committerThomas Harning Jr <harningt@gmail.com>2007-09-05 22:38:28 -0400
commit979040daddebcd90093c174006c5f13bfa085927 (patch)
tree77fbae1b4cd56934c667cbbfe92ea108ea266b07
parent7791d81b785c3a64342d8f63d002785038ade38d (diff)
downloadluaevent-prosody-979040daddebcd90093c174006c5f13bfa085927.tar.gz
luaevent-prosody-979040daddebcd90093c174006c5f13bfa085927.zip
Unlearned get/setMainThread functions since they were unused.
-rw-r--r--src/luaevent.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/luaevent.c b/src/luaevent.c
index 38f19ce..c9ce3d1 100644
--- a/src/luaevent.c
+++ b/src/luaevent.c
@@ -1,6 +1,7 @@
/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
* Licensed as LGPL - See doc/COPYING for details */
- #include "luaevent.h"
+
+#include "luaevent.h"
#include <lua.h>
#include <lauxlib.h>
@@ -8,19 +9,6 @@
#define EVENT_BASE_MT "EVENT_BASE_MT"
#define EVENT_CALLBACK_ARG_MT "EVENT_CALLBACK_ARG_MT"
-#define MAIN_THREAD_LOCATION 1
-
-void setMainThread(lua_State* L) {
- lua_pushthread(L);
- lua_rawseti(L, LUA_ENVIRONINDEX, MAIN_THREAD_LOCATION);
-}
-lua_State* getMainThread(lua_State* L) {
- lua_State* g_L;
- lua_rawgeti(L, LUA_ENVIRONINDEX, MAIN_THREAD_LOCATION);
- g_L = lua_tothread(L, -1);
- lua_pop(L, 1);
- return g_L;
-}
int luaevent_newbase(lua_State* L) {
le_base *base = (le_base*)lua_newuserdata(L, sizeof(le_base));
@@ -158,9 +146,6 @@ void setNamedIntegers(lua_State* L, namedInteger* p) {
/* Verified ok */
int luaopen_luaevent_core(lua_State* L) {
- /* Setup environ table */
- lua_createtable(L, 1, 0);
- lua_replace(L, LUA_ENVIRONINDEX);
/* Setup metatable */
luaL_newmetatable(L, EVENT_BASE_MT);
lua_newtable(L);