txlyre 3 weeks ago
parent
commit
c6c32b67f3
2 changed files with 3 additions and 0 deletions
  1. 1 0
      qirt.c
  2. 2 0
      qirt.h

+ 1 - 0
qirt.c

@@ -4062,6 +4062,7 @@ static void qi_state_setup(qi_state_t *state) {
   qi_decl_const(state, "false", state->_false);
   qi_decl_const(state, "NAN", state->nan);
   qi_decl_const(state, "INFINITY", state->infinity);
+  qi_decl_const(state, "__LIBQIRT", qi_make_string(state, (char *)LIBQIRT_INFO));
 
   qi_decl_const(state, "STDIN", state->_stdin);
   qi_decl_const(state, "STDERR", state->_stderr);

+ 2 - 0
qirt.h

@@ -11,6 +11,8 @@
 #include <string.h>
 #include <time.h>
 
+static const char *LIBQIRT_INFO = "libqirt v01 " __DATE__;
+
 typedef int bool;
 #define true 1
 #define false 0