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>
This commit is contained in:
parent
c62ad0047e
commit
d8e3ae8504
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue