diff options
author | Eion Robb <eion@robbmob.com> | 2016-04-16 01:34:46 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2016-04-16 01:34:46 +0300 |
commit | bf7dd28e4247f772313d1b4005c4084eb4890301 (patch) | |
tree | 011001b18ad151fa606b614109e1177157a9893c | |
parent | afa54b21d38e42c1722abc2ccc366b9ab8c47079 (diff) |
Suppress json-glib errors, see issue #133
-rw-r--r-- | steam-mobile/libsteam.h | 11 |
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 |