commit 02504d86d308aa3209f2faecc804912e3115b985
parent 4a818f068aef5c598c7af9ed5a834dee5d9a9eb6
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 19 Jun 2009 11:20:59 -0300
l_version may be local to 'lua_version'
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lapi.c b/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 2.82 2009/06/18 16:36:40 roberto Exp roberto $
+** $Id: lapi.c,v 2.83 2009/06/18 18:59:18 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -129,10 +129,9 @@ LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) {
}
-static const lua_Number l_version = LUA_VERSION_NUM;
-
LUA_API const lua_Number *lua_version (lua_State *L) {
- if (L == NULL) return &l_version;
+ static const lua_Number version = LUA_VERSION_NUM;
+ if (L == NULL) return &version;
else return G(L)->version;
}