nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | README | LICENSE

commit 31823f9b544a4afb897b42b62d4653dd2975b493
parent 8951beee49a67cd6200814f698825a6cb3f8d5bf
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 22 Jul 2023 11:05:49 -0700

rename to push_string -> make_string to align with other functions

Diffstat:
Mnostrdb.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nostrdb.c b/nostrdb.c @@ -235,7 +235,7 @@ static int ndb_builder_finalize_tag(struct ndb_builder *builder, } /// Unescape and push json strings -static int ndb_builder_push_json_str(struct ndb_builder *builder, +static int ndb_builder_make_json_str(struct ndb_builder *builder, const char *str, int len, union packed_str *pstr) { @@ -317,7 +317,7 @@ static int ndb_builder_push_json_tag(struct ndb_builder *builder, const char *str, int len) { union packed_str pstr; - if (!ndb_builder_push_json_str(builder, str, len, &pstr)) + if (!ndb_builder_make_json_str(builder, str, len, &pstr)) return 0; return ndb_builder_finalize_tag(builder, pstr); } @@ -423,7 +423,7 @@ int ndb_note_from_json(const char *json, int len, struct ndb_note **note, // content tok = &parser.toks[i+1]; union packed_str pstr; - if (!ndb_builder_push_json_str(&parser.builder, + if (!ndb_builder_make_json_str(&parser.builder, json + tok->start, toksize(tok), &pstr)) { return 0;