]> git.bitcoin.ninja Git - ldk-c-bindings/commit
Support passing `Option<&OpaqueStruct>` to C
authorMatt Corallo <git@bluematt.me>
Mon, 27 Feb 2023 18:51:59 +0000 (18:51 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 27 Feb 2023 18:51:59 +0000 (18:51 +0000)
commit6ee7c2a51f172ea1c5cb68249b10e32a3a22ac82
treef970a95fdd7e5f2d6b2c92996c32e4aab727235e
parent8eeaa64311e08261cfbe5b983609f299183bb1bc
Support passing `Option<&OpaqueStruct>` to C

Luckily the solution is trivial - just treat the conversion for the
inner pointer as `ptr_for_ref`, because we ultimately want a
pointer on the inside, not on the outside.
c-bindings-gen/src/types.rs