+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <talloc.h>
}
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
}
struct sprinter *
-sprinter_json_create (const void *ctx, FILE *stream)
+sprinter_json_create (notmuch_database_t *db, FILE *stream)
{
static const struct sprinter_json template = {
.vtable = {
};
struct sprinter_json *res;
- res = talloc (ctx, struct sprinter_json);
+ res = talloc (db, struct sprinter_json);
if (! res)
return NULL;
*res = template;
+ res->vtable.notmuch = db;
res->stream = stream;
return &res->vtable;
}