From 979040daddebcd90093c174006c5f13bfa085927 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Wed, 5 Sep 2007 22:38:28 -0400 Subject: Unlearned get/setMainThread functions since they were unused. --- src/luaevent.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src') 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 * Licensed as LGPL - See doc/COPYING for details */ - #include "luaevent.h" + +#include "luaevent.h" #include #include @@ -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); -- cgit v1.2.3