diff options
author | sanine-a <sanine.not@pm.me> | 2023-03-21 11:22:52 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2023-03-21 11:22:52 -0500 |
commit | 78eb15d59190c079b1edb405eeae6696724f1b2e (patch) | |
tree | 19341cac36443766950d1483952074068d0609b4 /src/main.c | |
parent | 184a9517a619c0052aabd8ad6ab00ed0d2607e97 (diff) |
move modules.h -> common.h and add version numbers
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -3,10 +3,11 @@ #include <lualib.h> #include "options/options.h" #include "util/util.h" -#include "modules.h" +#include "common.h" void print_load_error(lua_State *L, const char *script_file, int error_type); +void setup_version(lua_State *L, int honey_tbl); int main(int argc, char **argv) { @@ -69,3 +70,18 @@ void print_load_error(lua_State *L, const char *script_file, int error_type) break; }; } + + +void setup_version(lua_State *L, int honey_tbl) +{ + struct honey_tbl_t tbl[] = { + H_INT("major", HONEY_VERSION_MAJOR), + H_INT("minor", HONEY_VERSION_MINOR), + H_INT("patch", HONEY_VERSION_PATCH), + H_STR("string", HONEY_VERSION_STR), + + H_END + }; + create_table(L, tbl); + lua_setfield(L, honey_tbl, "version"); +} |