+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <talloc.h>
}
static void
-text_integer (struct sprinter *sp, int val)
+text_integer (struct sprinter *sp, int64_t val)
{
struct sprinter_text *sptxt = (struct sprinter_text *) sp;
- fprintf (sptxt->stream, "%d", val);
+ fprintf (sptxt->stream, "%" PRId64, val);
}
static void
}
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 = {
};
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;