52 lines
1.7 KiB
Diff
52 lines
1.7 KiB
Diff
|
commit d8e3ae85044a23424e8fcccc4af2ce7ce883ef74
|
||
|
Author: John Dennis <jdennis@redhat.com>
|
||
|
Date: Tue Feb 23 20:00:45 2016 -0500
|
||
|
|
||
|
add inline implementation of lasso_log
|
||
|
|
||
|
lasso_log is a private function of lasso and as such cannot be
|
||
|
referenced by the loader.
|
||
|
|
||
|
This is equivalent to commit e0bda691 in the PHP binding which
|
||
|
exhibited the same problem.
|
||
|
|
||
|
lasso_log is referenced in jobject_to_gobject() because of
|
||
|
lasso_assign_gobject macro, which includes the lasso_release_gobject
|
||
|
macro which invokes the message macro which expands to lasso_log.
|
||
|
|
||
|
License: MIT
|
||
|
Signed-off-by: John Dennis <jdennis@redhat.com>
|
||
|
|
||
|
diff --git a/bindings/java/wrapper_top.c b/bindings/java/wrapper_top.c
|
||
|
index 54bdeef..29c2014 100644
|
||
|
--- a/bindings/java/wrapper_top.c
|
||
|
+++ b/bindings/java/wrapper_top.c
|
||
|
@@ -6,6 +6,27 @@
|
||
|
#include "com_entrouvert_lasso_LassoJNI.h"
|
||
|
#include <string.h>
|
||
|
#include "../ghashtable.h"
|
||
|
+
|
||
|
+#if defined(__GNUC__)
|
||
|
+# define lasso_log(level, filename, line, function, format, args...) \
|
||
|
+ g_log("Lasso", level, "%s:%i:%s" format, filename, line, function, ##args)
|
||
|
+#elif defined(HAVE_VARIADIC_MACROS)
|
||
|
+# define lasso_log(level, format, line, function, ...) \
|
||
|
+ g_log("Lasso", leve, "%s:%i:%s" format, filename, line, function, __VA_ARGS__)
|
||
|
+#else
|
||
|
+static inline void lasso_log(GLogLevelFlags level, const char *filename,
|
||
|
+ int line, const char *function, const char *format, ...)
|
||
|
+{
|
||
|
+ va_list ap;
|
||
|
+ char s[1024];
|
||
|
+ va_start(ap, format);
|
||
|
+ g_vsnprintf(s, 1024, format, ap);
|
||
|
+ va_end(ap);
|
||
|
+ g_log("Lasso", level, "%s:%i:%s %s", filename, line, function, s);
|
||
|
+}
|
||
|
+#define lasso_log lasso_log
|
||
|
+#endif
|
||
|
+
|
||
|
#include "../../lasso/utils.h"
|
||
|
#include "../utils.c"
|
||
|
#include "../../lasso/backward_comp.h"
|