commit cebd545c19ad9079f0d183615c784cd684306f1b parent 588385e98757ffc43d3bbba90ff9d09b7f9d904e Author: William Casarin <jb55@jb55.com> Date: Thu, 25 Jan 2024 15:31:17 -0800 header: add ptr helpers for swift swift is kind of dumb when it comes to opaque pointers Diffstat:
M | src/nostrdb.h | | | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/nostrdb.h b/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; };