# HG changeset patch # User Josef 'Jeff' Sipek # Date 1727299912 14400 # Wed Sep 25 17:31:52 2024 -0400 # Node ID a74adc418fc1c82172ee8b28b028deb60b7f1a42 # Parent d5518a63714067aaa4b2a831091a2157586a405d xlua: add hlog.version with the hlog version Signed-off-by: Josef 'Jeff' Sipek diff --git a/docs/lua-hlog-module.md b/docs/lua-hlog-module.md --- a/docs/lua-hlog-module.md +++ b/docs/lua-hlog-module.md @@ -5,6 +5,9 @@ access to the `hlog` module. This file documents all the functions provided by this module. +### `version` +The version string of the running hlog code. + hlog.adif --------- diff --git a/xlua/xlua.c b/xlua/xlua.c --- a/xlua/xlua.c +++ b/xlua/xlua.c @@ -23,6 +23,8 @@ #include #include +#include + #include "xlua-impl.h" #include "script.h" @@ -110,6 +112,10 @@ xlua_pushlib_utils(L); lua_settable(L, -3); + lua_pushliteral(L, "version"); + lua_pushstring(L, version_string); + lua_settable(L, -3); + luaL_setfuncs(L, xlua_funcs, 0); lua_setglobal(L, "hlog");