diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/lstatslib.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lstatslib.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c index 59ab92cbde6..6c2413137c7 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c @@ -18,8 +18,8 @@ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */ static const char _svn_version[] = - "$Id: lstatslib.c 4524 2012-12-20 15:38:02Z taco $ " - "$URL: https://foundry.supelec.fr/svn/luatex/branches/ex-glyph/source/texk/web2c/luatexdir/lua/lstatslib.c $"; + "$Id: lstatslib.c 4857 2014-03-07 00:01:41Z luigi $ " + "$URL: https://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lstatslib.c $"; #include "ptexlib.h" #include "lua/luatex-api.h" @@ -78,6 +78,25 @@ static const char *luatexrevision(void) return (const char *) (strrchr(luatex_version_string, '.') + 1); } +static lua_Number get_luatexhashchars(void) +{ +#ifdef LuajitTeX + return (lua_Number) LUAJITTEX_HASHCHARS; +#else + return (lua_Number) LUATEX_HASHCHARS; +#endif +} + +static const char *get_luatexhashtype(void) +{ +#ifdef LuajitTeX + return (const char *)jithash_hashname; +#else + return "lua"; +#endif +} + + static lua_Number get_pdf_gone(void) { if (static_pdf != NULL) @@ -172,6 +191,10 @@ static struct statistic stats[] = { {"luatex_svn", 'G', &get_luatexsvn}, {"luatex_version", 'G', &get_luatexversion}, {"luatex_revision", 'S', (void *) &luatexrevision}, + {"luatex_hashtype", 'S', (void *) &get_luatexhashtype}, + {"luatex_hashchars", 'N', &get_luatexhashchars}, + + {"ini_version", 'b', &ini_version}, /* * mem stat @@ -344,7 +367,7 @@ static const struct luaL_Reg statslib[] = { int luaopen_stats(lua_State * L) { luaL_register(L, "status", statslib); - luaL_newmetatable(L, "stats_meta"); + luaL_newmetatable(L, "tex.stats"); lua_pushstring(L, "__index"); lua_pushcfunction(L, getstats); lua_settable(L, -3); |