aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-06-19 11:21:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-06-19 11:21:23 -0300
commit02504d86d308aa3209f2faecc804912e3115b985 (patch)
tree797668371534d395046150bf4ac3f0190f741265 /lapi.c
parent4a818f068aef5c598c7af9ed5a834dee5d9a9eb6 (diff)
downloadlua-02504d86d308aa3209f2faecc804912e3115b985.tar.gz
lua-02504d86d308aa3209f2faecc804912e3115b985.tar.bz2
lua-02504d86d308aa3209f2faecc804912e3115b985.zip
l_version may be local to 'lua_version'
Diffstat (limited to 'lapi.c')
-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