new function 'lua_version' (so that 'checkversion' can be implemented

in the auxiliary library)
This commit is contained in:
Roberto Ierusalimschy
2009-06-18 15:59:18 -03:00
parent bc3e02a1b7
commit 1d6ebce296
4 changed files with 12 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstate.c,v 2.54 2009/04/28 19:04:36 roberto Exp roberto $
** $Id: lstate.c,v 2.55 2009/06/01 19:09:26 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -208,7 +208,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
setnilvalue(registry(L));
luaZ_initbuffer(L, &g->buff);
g->panic = NULL;
g->nilobjp = luaO_nilobject;
g->version = lua_version(NULL);
g->gcstate = GCSpause;
g->rootgc = obj2gco(L);
g->sweepstrgc = 0;