diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.315 2017/02/23 21:07:34 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.316 2017/05/26 19:14:29 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -504,7 +504,7 @@ static const luaL_Reg base_funcs[] = { | |||
504 | {"type", luaB_type}, | 504 | {"type", luaB_type}, |
505 | {"xpcall", luaB_xpcall}, | 505 | {"xpcall", luaB_xpcall}, |
506 | /* placeholders */ | 506 | /* placeholders */ |
507 | {"_G", NULL}, | 507 | {LUA_GNAME, NULL}, |
508 | {"_VERSION", NULL}, | 508 | {"_VERSION", NULL}, |
509 | {NULL, NULL} | 509 | {NULL, NULL} |
510 | }; | 510 | }; |
@@ -516,7 +516,7 @@ LUAMOD_API int luaopen_base (lua_State *L) { | |||
516 | luaL_setfuncs(L, base_funcs, 0); | 516 | luaL_setfuncs(L, base_funcs, 0); |
517 | /* set global _G */ | 517 | /* set global _G */ |
518 | lua_pushvalue(L, -1); | 518 | lua_pushvalue(L, -1); |
519 | lua_setfield(L, -2, "_G"); | 519 | lua_setfield(L, -2, LUA_GNAME); |
520 | /* set global _VERSION */ | 520 | /* set global _VERSION */ |
521 | lua_pushliteral(L, LUA_VERSION); | 521 | lua_pushliteral(L, LUA_VERSION); |
522 | lua_setfield(L, -2, "_VERSION"); | 522 | lua_setfield(L, -2, "_VERSION"); |