summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-09 21:30:24 -0800
committerPixel <pixel@nobis-crew.org>2009-11-09 21:30:24 -0800
commit0a8b9c1a3d054fa95ca76131b7422ee9f25bd4f9 (patch)
treea995f6deb36524830aab777bfcc381651d723097
parent15b0e9849e3830eefc6c98aa7d0858981a0318b5 (diff)
Removing the Lua lock system, and switching to a true Lua C++ inclusion philosophie.
-rw-r--r--include/BLua.h12
-rw-r--r--lib/BLua.cc28
2 files changed, 2 insertions, 38 deletions
diff --git a/include/BLua.h b/include/BLua.h
index 2afcdef..49573e3 100644
--- a/include/BLua.h
+++ b/include/BLua.h
@@ -25,15 +25,10 @@
struct lua_State;
extern "C" {
- void do_lua_lock(lua_State *);
- void do_lua_unlock(lua_State *);
-}
-
-#define lua_lock(L) do_lua_lock(L)
-#define lua_unlock(L) do_lua_unlock(L)
-
#include <lua.h>
#include <lauxlib.h>
+}
+
#include <map>
#include <Exceptions.h>
#include <Handle.h>
@@ -147,9 +142,6 @@ class Lua : public Base {
void do_break();
- virtual void lock();
- virtual void unlock();
-
bool is_protected();
void openlib(const String & libname, const struct luaL_reg *l, int nup);
diff --git a/lib/BLua.cc b/lib/BLua.cc
index 05c60b7..c1c7f44 100644
--- a/lib/BLua.cc
+++ b/lib/BLua.cc
@@ -36,28 +36,6 @@ void LuaPrinter::puts(const char * msg) {
LuaPrinter default_lua_printer;
-extern "C" {
- void do_lua_lock(lua_State * __L) {
- Lua * L;
- try {
- L = Lua::find(__L);
- } catch (GeneralException e) {
- return;
- }
- L->lock();
- }
-
- void do_lua_unlock(lua_State * __L) {
- Lua * L;
- try {
- L = Lua::find(__L);
- } catch (GeneralException e) {
- return;
- }
- L->unlock();
- }
-}
-
class LuaStatics : public Base {
public:
static const char * getF(lua_State *, void *, size_t *);
@@ -1298,12 +1276,6 @@ void Lua::do_break() {
// lua_break(L);
}
-void Lua::lock() {
-}
-
-void Lua::unlock() {
-}
-
void Lua::openlib(const String & libname, const luaL_reg *l, int nup) {
luaL_openlib(L, libname.to_charp(), l, nup);
}