From c0870785febfdf26ee900bbf07986b00ed97db2e Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 22 Sep 2024 19:18:50 +0200 Subject: [PATCH] [mujs] show version --- src/ecmascript/mujs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ecmascript/mujs.c b/src/ecmascript/mujs.c index c8723e8b0..89ff17fab 100644 --- a/src/ecmascript/mujs.c +++ b/src/ecmascript/mujs.c @@ -73,9 +73,14 @@ /*** Global methods */ +static char mujs_version[32]; + static void -mujs_init(struct module *xxx) +mujs_init(struct module *module) { + snprintf(mujs_version, 31, "MuJS %d.%d.%d", JS_VERSION_MAJOR, JS_VERSION_MINOR, JS_VERSION_PATCH); + module->name = mujs_version; + map_attrs = attr_create_new_map(); map_attributes = attr_create_new_map(); map_rev_attributes = attr_create_new_map();