From 49cd9cf95714605fedc63cf357cb3addd6d342b2 Mon Sep 17 00:00:00 2001 From: Eion Robb Date: Mon, 27 Mar 2017 17:28:54 +1300 Subject: Suppress some noisy json-glib warnings Should help with issue #532 --- skypeweb/libskypeweb.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skypeweb/libskypeweb.h b/skypeweb/libskypeweb.h index 381afc6..102febf 100644 --- a/skypeweb/libskypeweb.h +++ b/skypeweb/libskypeweb.h @@ -66,6 +66,10 @@ (JSON_OBJECT && json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_object_member(JSON_OBJECT, MEMBER) : NULL) #define json_object_get_boolean_member(JSON_OBJECT, MEMBER) \ (JSON_OBJECT && json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_boolean_member(JSON_OBJECT, MEMBER) : FALSE) +#define json_array_get_length(JSON_ARRAY) \ + (JSON_ARRAY ? json_array_get_length(JSON_ARRAY) : 0) +#define json_node_get_array(JSON_NODE) \ + (JSON_NODE && JSON_NODE_TYPE(JSON_NODE) == JSON_NODE_ARRAY ? json_node_get_array(JSON_NODE) : NULL) #ifndef PURPLE_PLUGINS # define PURPLE_PLUGINS -- cgit v1.2.3