Projet

Général

Profil

0001-binding-java-add-inline-implementation-of-lasso_log.patch

suggested patch - John Dennis, 24 février 2016 14:13

Télécharger (1,9 ko)

Voir les différences:

Subject: [PATCH] [binding java] add inline implementation of lasso_log
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

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>
 bindings/java/wrapper_top.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
bindings/java/wrapper_top.c
6 6
#include "com_entrouvert_lasso_LassoJNI.h"
7 7
#include <string.h>
8 8
#include "../ghashtable.h"
9

  
10
#if defined(__GNUC__)
11
#  define lasso_log(level, filename, line, function, format, args...) \
12
        g_log("Lasso", level, "%s:%i:%s" format, filename, line, function, ##args)
13
#elif defined(HAVE_VARIADIC_MACROS)
14
#  define lasso_log(level, format, line, function, ...)  \
15
        g_log("Lasso", leve, "%s:%i:%s" format, filename, line, function, __VA_ARGS__)
16
#else
17
static inline void lasso_log(GLogLevelFlags level, const char *filename,
18
    int line, const char *function, const char *format, ...)
19
{
20
	va_list ap;
21
	char s[1024];
22
	va_start(ap, format);
23
	g_vsnprintf(s, 1024, format, ap);
24
	va_end(ap);
25
    g_log("Lasso", level, "%s:%i:%s %s", filename, line, function, s);
26
}
27
#define lasso_log lasso_log
28
#endif
29

  
9 30
#include "../../lasso/utils.h"
10 31
#include "../utils.c"
11 32
#include "../../lasso/backward_comp.h"
12
-