]> git.bitcoin.ninja Git - rust-lightning/commit
[bindings] Support mapping slices which contain tuples (with refs)
authorMatt Corallo <git@bluematt.me>
Fri, 25 Sep 2020 17:25:35 +0000 (13:25 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 21 Oct 2020 18:50:22 +0000 (14:50 -0400)
commita14e63e0b34eed7a6ed341e897ed1c2257dad13f
tree3e198595ba4f852f433194821eba8f234e84de27
parentd9a38d1846ad64622706c3093c0bb3a405817899
[bindings] Support mapping slices which contain tuples (with refs)

New work upstream puts tuples in slices, which is a very reasonable
thing to expect, however we don't know how to generate conversions
for such objects. Making it more complicated, upstream changes also
include references to things inside such slices, which requires
special handling to avoid creating dangling references.

This adds support for converting such objects, noting that slices
need to be converted first into Vecs which own their underlying
objects and then need to map any reference types into references.
c-bindings-gen/src/types.rs