[gegl] debug: Fix build issues



commit 84839b0255e5ba28dfc9afb34f2ac45d8f669e2c
Author: Jan Vesely <jano vesely gmail com>
Date:   Mon Feb 10 01:48:20 2020 -0500

    debug: Fix build issues
    
    Expose needed structure, fix typos.
    Add gegl_get_timestamp implementation
    Signed-off-by: Jan Vesely <jano vesely gmail com>

 gegl/gegl-debug.h | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/gegl/gegl-debug.h b/gegl/gegl-debug.h
index 324ac72dc..94ba30f51 100644
--- a/gegl/gegl-debug.h
+++ b/gegl/gegl-debug.h
@@ -5,6 +5,8 @@
 
 G_BEGIN_DECLS
 
+extern guint gegl_debug_flags;
+
 typedef enum {
   GEGL_DEBUG_PROCESS         = 1 << 0,
   GEGL_DEBUG_BUFFER_LOAD     = 1 << 1,
@@ -24,7 +26,7 @@ typedef enum {
  * flags
  */
 #ifdef __GEGL_INIT_C
-static const GDebugKey gegl_debug_keys[] = {
+const GDebugKey gegl_debug_keys[] = {
   { "process",       GEGL_DEBUG_PROCESS},
   { "cache",         GEGL_DEBUG_CACHE},
   { "buffer-load",   GEGL_DEBUG_BUFFER_LOAD},
@@ -45,6 +47,8 @@ static const GDebugKey gegl_debug_keys[] = {
                      GEGL_DEBUG_BUFFER_ALLOC|
                      GEGL_DEBUG_LICENSE},
 };
+#else
+extern GDebugKey gegl_debug_keys[];
 #endif /* __GEGL_INIT_C */
 
 #if defined(__cplusplus) && defined(GEGL_ISO_CXX_VARIADIC_MACROS)
@@ -53,6 +57,12 @@ static const GDebugKey gegl_debug_keys[] = {
 
 #ifdef GEGL_ENABLE_DEBUG
 
+static inline
+gint64 gegl_get_timestamp(void)
+{
+       return g_get_monotonic_time();
+}
+
 #if defined(GEGL_ISO_VARIADIC_MACROS)
 
 /* Use the C99 version; unfortunately, this does not allow us to pass
@@ -125,7 +135,7 @@ gegl_lookup_debug_string  (guint type)
 static inline void
 GEGL_NOTE (guint type, const char *format, ...)
 {
-  va_alist args;
+  va_list args;
 
   if (gegl_debug_flags & type)
   {
@@ -142,7 +152,7 @@ GEGL_NOTE (guint type, const char *format, ...)
 static inline void
 GEGL_TIMESTAMP (guint type, const char *format, ...)
 {
-  va_alist args;
+  va_list args;
   
   if (gegl_debug_flags & type)
   {
@@ -195,8 +205,6 @@ GEGL_TIMESTAMP (guint type, const char *format, ...)
 
 #endif /* GEGL_ENABLE_DEBUG */
 
-extern guint gegl_debug_flags;
-
 G_END_DECLS
 
 #endif /* __GEGL_DEBUG_H__  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]