X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=sprinter-json.c;h=502f89fbb70ef8424543009278dc9d8c23b17f74;hp=273bdeca3d736dcb16f90acdf4ee6377efb281d0;hb=69289c5d62caa114a28532d00b8f11b564b43fd4;hpb=c17fca40e2bc5514863d98807aaed318f144fd1a diff --git a/sprinter-json.c b/sprinter-json.c index 273bdeca..502f89fb 100644 --- a/sprinter-json.c +++ b/sprinter-json.c @@ -129,7 +129,7 @@ json_integer (struct sprinter *sp, int64_t val) { struct sprinter_json *spj = json_begin_value (sp); - fprintf (spj->stream, "%"PRId64, val); + fprintf (spj->stream, "%" PRId64, val); } static void @@ -172,7 +172,7 @@ json_separator (struct sprinter *sp) } 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 = { @@ -192,11 +192,12 @@ sprinter_json_create (const void *ctx, FILE *stream) }; 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; }