* Author: Peter Feigl <peter.feigl@gmx.at>
*/
+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <talloc.h>
}
static void
-sexp_integer (struct sprinter *sp, int val)
+sexp_integer (struct sprinter *sp, int64_t val)
{
struct sprinter_sexp *sps = sexp_begin_value (sp);
- fprintf (sps->stream, "%d", val);
+ fprintf (sps->stream, "%" PRId64, val);
}
static void
}
struct sprinter *
-sprinter_sexp_create (const void *ctx, FILE *stream)
+sprinter_sexp_create (notmuch_database_t *db, FILE *stream)
{
static const struct sprinter_sexp template = {
.vtable = {
};
struct sprinter_sexp *res;
- res = talloc (ctx, struct sprinter_sexp);
+ res = talloc (db, struct sprinter_sexp);
if (! res)
return NULL;
*res = template;
+ res->vtable.notmuch = db;
res->stream = stream;
return &res->vtable;
}