]> git.notmuchmail.org Git - notmuch/blobdiff - sprinter-json.c
sprinter: change integer method to use int64_t
[notmuch] / sprinter-json.c
index c6ec857720d9e6acd0c0c4b9410afaa391249606..273bdeca3d736dcb16f90acdf4ee6377efb281d0 100644 (file)
@@ -1,3 +1,4 @@
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <talloc.h>
@@ -124,11 +125,11 @@ json_string (struct sprinter *sp, const char *val)
 }
 
 static void
-json_integer (struct sprinter *sp, int val)
+json_integer (struct sprinter *sp, int64_t val)
 {
     struct sprinter_json *spj = json_begin_value (sp);
 
-    fprintf (spj->stream, "%d", val);
+    fprintf (spj->stream, "%"PRId64, val);
 }
 
 static void