Do not use `bool` type; use new `bt_bool` instead
[babeltrace.git] / lib / babeltrace.c
index 0bcfd1d231aed9f4b3ce9dfaab5dac0c71cd87ed..2b675eb299d4eb18a7efd5b6853ae70fe97aa43e 100644 (file)
  */
 
 #include <babeltrace/babeltrace.h>
-#include <babeltrace/context.h>
-#include <babeltrace/ctf-text/types.h>
+#include <babeltrace/types.h>
 #include <stdlib.h>
 
-int babeltrace_verbose, babeltrace_debug;
+bt_bool babeltrace_verbose, babeltrace_debug;
 
 static
 void __attribute__((constructor)) init_babeltrace_lib(void)
 {
        if (getenv("BABELTRACE_VERBOSE"))
-               babeltrace_verbose = 1;
+               babeltrace_verbose = BT_TRUE;
        if (getenv("BABELTRACE_DEBUG"))
-               babeltrace_debug = 1;
+               babeltrace_debug = BT_TRUE;
+}
+
+int bt_version_get_major(void)
+{
+       return BT_VERSION_MAJOR;
+}
+
+int bt_version_get_minor(void)
+{
+       return BT_VERSION_MINOR;
+}
+
+int bt_version_get_patch(void) {
+       return BT_VERSION_PATCH;
+}
+
+const char *bt_version_get_extra(void)
+{
+       return BT_VERSION_EXTRA;
 }
This page took 0.024033 seconds and 4 git commands to generate.