summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-13 09:39:54 +0000
committerpixel <pixel>2008-08-13 09:39:54 +0000
commit441613bf23533f272722d88b161328abe2a0993d (patch)
treee59f08796da1ad024029a42d32600f8db63514d1 /src
parent068c558dc1e915e9a20eb6c71b8a50621a8e184c (diff)
Adding double-loading locks
Diffstat (limited to 'src')
-rw-r--r--src/plugin-luaconfigfiles.cc3
-rw-r--r--src/plugin-luaftgl.cc3
-rw-r--r--src/plugin-luagl.cc3
-rw-r--r--src/plugin-luahandle.cc3
-rw-r--r--src/plugin-luahttp.cc3
-rw-r--r--src/plugin-lualibs.cc3
-rw-r--r--src/plugin-luaocci.cc3
-rw-r--r--src/plugin-luaosmesa.cc3
-rw-r--r--src/plugin-luaregex.cc3
-rw-r--r--src/plugin-luasql.cc3
-rw-r--r--src/plugin-luatask.cc3
-rw-r--r--src/plugin-luaxml.cc3
12 files changed, 36 insertions, 0 deletions
diff --git a/src/plugin-luaconfigfiles.cc b/src/plugin-luaconfigfiles.cc
index 196fed1..32f6130 100644
--- a/src/plugin-luaconfigfiles.cc
+++ b/src/plugin-luaconfigfiles.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaConfigFile::pushstatics(L);
}
diff --git a/src/plugin-luaftgl.cc b/src/plugin-luaftgl.cc
index 83f26f1..95f23f0 100644
--- a/src/plugin-luaftgl.cc
+++ b/src/plugin-luaftgl.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaFTFont::pushstatics(L);
}
diff --git a/src/plugin-luagl.cc b/src/plugin-luagl.cc
index b319a85..fe7c525 100644
--- a/src/plugin-luagl.cc
+++ b/src/plugin-luagl.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
luaopen_opengl(L);
L->pop();
}
diff --git a/src/plugin-luahandle.cc b/src/plugin-luahandle.cc
index 7e6b675..05d9fa9 100644
--- a/src/plugin-luahandle.cc
+++ b/src/plugin-luahandle.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaInput::pushconstruct(L);
LuaOutput::pushconstruct(L);
LuaBuffer::pushconstruct(L);
diff --git a/src/plugin-luahttp.cc b/src/plugin-luahttp.cc
index ef3a5f4..dd780ea 100644
--- a/src/plugin-luahttp.cc
+++ b/src/plugin-luahttp.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaHttpResponse::pushstatics(L);
}
diff --git a/src/plugin-lualibs.cc b/src/plugin-lualibs.cc
index 36b866d..d14dc30 100644
--- a/src/plugin-lualibs.cc
+++ b/src/plugin-lualibs.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LoadLuaLibs(L);
}
diff --git a/src/plugin-luaocci.cc b/src/plugin-luaocci.cc
index 0cade24..3d8a445 100644
--- a/src/plugin-luaocci.cc
+++ b/src/plugin-luaocci.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaOCCI_pushstatics(L);
}
diff --git a/src/plugin-luaosmesa.cc b/src/plugin-luaosmesa.cc
index 09929b7..daf0fd4 100644
--- a/src/plugin-luaosmesa.cc
+++ b/src/plugin-luaosmesa.cc
@@ -241,6 +241,9 @@ int sLua_plugin_osmesa::plugin_osmesa_proceed_statics(Lua * L, int n, int caller
}
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
init_OSMesa();
Luaplugin_osmesa::pushstatics(L);
}
diff --git a/src/plugin-luaregex.cc b/src/plugin-luaregex.cc
index 13be506..739d8f9 100644
--- a/src/plugin-luaregex.cc
+++ b/src/plugin-luaregex.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaRegex::pushstatics(L);
}
diff --git a/src/plugin-luasql.cc b/src/plugin-luasql.cc
index 19588fe..84350e7 100644
--- a/src/plugin-luasql.cc
+++ b/src/plugin-luasql.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaSQLConnection::pushstatics(L);
}
diff --git a/src/plugin-luatask.cc b/src/plugin-luatask.cc
index 3fc2b3f..f6b29d3 100644
--- a/src/plugin-luatask.cc
+++ b/src/plugin-luatask.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
LuaTaskMan::pushstatics(L);
}
diff --git a/src/plugin-luaxml.cc b/src/plugin-luaxml.cc
index b6ad423..cee1132 100644
--- a/src/plugin-luaxml.cc
+++ b/src/plugin-luaxml.cc
@@ -7,6 +7,9 @@
#endif
static void _init_plugin(Lua * L) {
+ static bool done = false;
+ if (done) return;
+ done = true;
luaopen_xml(L);
L->pop();
}