Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2016-04-16 01:34:46 +0300
committerEion Robb <eion@robbmob.com>2016-04-16 01:34:46 +0300
commitbf7dd28e4247f772313d1b4005c4084eb4890301 (patch)
tree011001b18ad151fa606b614109e1177157a9893c
parentafa54b21d38e42c1722abc2ccc366b9ab8c47079 (diff)
Suppress json-glib errors, see issue #133
-rw-r--r--steam-mobile/libsteam.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/steam-mobile/libsteam.h b/steam-mobile/libsteam.h
index d744765..df89ca1 100644
--- a/steam-mobile/libsteam.h
+++ b/steam-mobile/libsteam.h
@@ -39,6 +39,17 @@
#include <json-glib/json-glib.h>
+#define json_object_get_int_member(JSON_OBJECT, MEMBER) \
+ (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_int_member(JSON_OBJECT, MEMBER) : 0)
+#define json_object_get_string_member(JSON_OBJECT, MEMBER) \
+ (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_string_member(JSON_OBJECT, MEMBER) : NULL)
+#define json_object_get_array_member(JSON_OBJECT, MEMBER) \
+ (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_array_member(JSON_OBJECT, MEMBER) : NULL)
+#define json_object_get_object_member(JSON_OBJECT, MEMBER) \
+ (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_has_member(JSON_OBJECT, MEMBER) ? json_object_get_boolean_member(JSON_OBJECT, MEMBER) : FALSE)
+
#ifndef PURPLE_PLUGINS
# define PURPLE_PLUGINS
#endif