X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=sprinter-text.c;h=99330a94768605ebbd9977ae2563b90c7cda4e15;hp=7b68f98ccbb17e7a494cbc925e954af6347e3b91;hb=HEAD;hpb=c17fca40e2bc5514863d98807aaed318f144fd1a diff --git a/sprinter-text.c b/sprinter-text.c index 7b68f98c..99330a94 100644 --- a/sprinter-text.c +++ b/sprinter-text.c @@ -49,7 +49,7 @@ text_integer (struct sprinter *sp, int64_t val) { struct sprinter_text *sptxt = (struct sprinter_text *) sp; - fprintf (sptxt->stream, "%"PRId64, val); + fprintf (sptxt->stream, "%" PRId64, val); } static void @@ -114,7 +114,7 @@ text_map_key (unused (struct sprinter *sp), unused (const char *key)) } struct sprinter * -sprinter_text_create (const void *ctx, FILE *stream) +sprinter_text_create (notmuch_database_t *db, FILE *stream) { static const struct sprinter_text template = { .vtable = { @@ -134,21 +134,22 @@ sprinter_text_create (const void *ctx, FILE *stream) }; struct sprinter_text *res; - res = talloc (ctx, struct sprinter_text); + res = talloc (db, struct sprinter_text); if (! res) return NULL; *res = template; + res->vtable.notmuch = db; res->stream = stream; return &res->vtable; } struct sprinter * -sprinter_text0_create (const void *ctx, FILE *stream) +sprinter_text0_create (notmuch_database_t *db, FILE *stream) { struct sprinter *sp; - sp = sprinter_text_create (ctx, stream); + sp = sprinter_text_create (db, stream); if (! sp) return NULL;