From 200b43431695d3d4cccadafb2a37373fc55af0bb Mon Sep 17 00:00:00 2001 From: Pavel Levshin Date: Sat, 26 Oct 2013 14:57:37 +0400 Subject: Make use of int64 json numbers, if available --- plugins/ommongodb/ommongodb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/ommongodb/ommongodb.c') diff --git a/plugins/ommongodb/ommongodb.c b/plugins/ommongodb/ommongodb.c index ecfd2518..a7c42010 100644 --- a/plugins/ommongodb/ommongodb.c +++ b/plugins/ommongodb/ommongodb.c @@ -311,8 +311,11 @@ BSONAppendJSONObject(bson *doc, const gchar *name, struct json_object *json) case json_type_int: { int64_t i; - /* FIXME: the future version will have get_int64 */ +#ifdef HAVE_JSON_OBJECT_NEW_INT64 + i = json_object_get_int64(json); +#else /* HAVE_JSON_OBJECT_NEW_INT64 */ i = json_object_get_int(json); +#endif /* HAVE_JSON_OBJECT_NEW_INT64 */ if (i >= INT32_MIN && i <= INT32_MAX) return bson_append_int32(doc, name, i); else -- cgit v1.2.3