]> git.notmuchmail.org Git - notmuch/blobdiff - sprinter-json.c
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / sprinter-json.c
index c7f4851cdd53bc6231d7a56e1d19e80834a09536..502f89fbb70ef8424543009278dc9d8c23b17f74 100644 (file)
@@ -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;
 }