diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2009-04-16 07:56:44 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2009-04-16 07:56:44 +0000 |
commit | 40c2ba944e1cee0677734608263cbc7ba3a729bf (patch) | |
tree | 6da3acbd4e74eb5854f90416313fb56a4eb29824 /Build/source/texk/web2c/luatexdir/lua/lstatslib.c | |
parent | 79e9c535970a1887e1b6b2196cd90775955ea486 (diff) |
Import luatex 0.39.0
git-svn-id: svn://tug.org/texlive/trunk@12733 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/lstatslib.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lstatslib.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c index 586ded0db4f..d98cfadfcb4 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c @@ -22,7 +22,7 @@ static const char _svn_version[] = - "$Id: lstatslib.c 2064 2009-03-20 13:13:14Z taco $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/src/texk/web2c/luatexdir/lua/lstatslib.c $"; + "$Id: lstatslib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lstatslib.c $"; typedef struct statistic { const char *name; @@ -57,10 +57,14 @@ char *getlasterror(void) return makecstring(last_error); } +char *luatexrevision(void) +{ + return makecstring(get_luatexrevision()); +} extern int luabytecode_max; extern int luabytecode_bytes; -static int luastate_max = 1; /* fixed value */ +static int luastate_max = 1; /* fixed value */ extern int luastate_bytes; extern int callback_count; extern int saved_callback_count; @@ -75,6 +79,9 @@ static struct statistic stats[] = { {"log_name", 's', &texmf_log_name}, /* weird */ {"banner", 'S', &getbanner}, {"pdftex_banner", 's', &pdftex_banner}, + {"luatex_version", 'G', &get_luatexversion}, + {"luatex_revision", 'S', &luatexrevision}, + {"ini_version", 'b', &ini_version}, /* * mem stat */ @@ -182,7 +189,10 @@ static int do_getstat(lua_State * L, int i) lua_pushboolean(L, g()); break; case 'n': - lua_nodelib_push_fast(L, *(halfword *) (stats[i].value)); + if (*(halfword *) (stats[i].value)!=0) + lua_nodelib_push_fast(L, *(halfword *) (stats[i].value)); + else + lua_pushnil(L); break; case 'b': lua_pushboolean(L, *(integer *) (stats[i].value)); |