Added a centralized method to manage Lua compatibility build options. - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/lua-gsl.c
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2011年02月02日 18:13:11 +0100
committerfrancesco-ST <francesco.abbate@st.com>2011年02月02日 18:13:11 +0100
commit87feed1b8c36fd42a3750d01382a4978971416cc (patch)
tree90f68f0d96a64b3f8ea14fb59655c8154808a24f /lua-gsl.c
parent00cb071098589dc5824509d7e7786fde16a00ff2 (diff)
downloadgsl-shell-87feed1b8c36fd42a3750d01382a4978971416cc.tar.gz
Added a centralized method to manage Lua compatibility build options.
The build is controlled by the variable LUA_COMPATIBLE in makeconfig. The possible values are 'no', 'yes' and 'strict'.
Diffstat (limited to 'lua-gsl.c')
-rw-r--r--lua-gsl.c 4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua-gsl.c b/lua-gsl.c
index 073216f3..17976872 100644
--- a/lua-gsl.c
+++ b/lua-gsl.c
@@ -56,7 +56,9 @@
#include "lua-plot.h"
#endif
+#ifdef LUA_STRICT
static const struct luaL_Reg gsl_methods_dummy[] = {{NULL, NULL}};
+#endif
int
luaopen_gsl (lua_State *L)
@@ -68,7 +70,7 @@ luaopen_gsl (lua_State *L)
object_refs_prepare (L);
#endif
-#ifdef USE_SEPARATE_NAMESPACE
+#ifdef LUA_STRICT
luaL_register (L, MLUA_GSLLIBNAME, gsl_methods_dummy);
#else
lua_pushvalue (L, LUA_GLOBALSINDEX);
generated by cgit v1.2.3 (git 2.46.0) at 2025年10月02日 12:31:34 +0000

AltStyle によって変換されたページ (->オリジナル) /