commit 588cebd18d6b887444a736060d06991c275f246d parent ccca6e58ec3051020dd066aaa99fc2d0bb3a4a84 Author: William Casarin <jb55@jb55.com> Date: Thu, 25 Jan 2024 15:31:17 -0800 nostrdb: header: add ptr helpers for swift swift is kind of dumb when it comes to opaque pointers Signed-off-by: William Casarin <jb55@jb55.com> Diffstat:
M | nostrdb/src/nostrdb.h | | | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/nostrdb/src/nostrdb.h b/nostrdb/src/nostrdb.h @@ -32,7 +32,13 @@ struct ndb_lmdb; union ndb_packed_str; struct bolt11; -// sorry, swift needs help with forward declared pointers like this +// some bindings like swift needs help with forward declared pointers +struct ndb_tag_ptr { struct ndb_tag *ptr; }; +struct ndb_tags_ptr { struct ndb_tags *ptr; }; +struct ndb_block_ptr { struct ndb_block *ptr; }; +struct ndb_blocks_ptr { struct ndb_blocks *ptr; }; +struct ndb_note_ptr { struct ndb_note *ptr; }; + struct ndb_t { struct ndb *ndb; };