aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lapi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lapi.c b/lapi.c
index dd8a96ac..6f33c950 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.82 2009/06/18 16:36:40 roberto Exp roberto $ 2** $Id: lapi.c,v 2.83 2009/06/18 18:59:18 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -129,10 +129,9 @@ LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) {
129} 129}
130 130
131 131
132static const lua_Number l_version = LUA_VERSION_NUM;
133
134LUA_API const lua_Number *lua_version (lua_State *L) { 132LUA_API const lua_Number *lua_version (lua_State *L) {
135 if (L == NULL) return &l_version; 133 static const lua_Number version = LUA_VERSION_NUM;
134 if (L == NULL) return &version;
136 else return G(L)->version; 135 else return G(L)->version;
137} 136}
138 137