]> git.bitcoin.ninja Git - ldk-c-bindings/commit
Support passing lifetime'd enums to C
authorMatt Corallo <git@bluematt.me>
Fri, 29 Dec 2023 20:50:22 +0000 (20:50 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 29 Dec 2023 20:50:22 +0000 (20:50 +0000)
commit349213afe7baff6bce98dce44c5970519a5efbdb
tree8757dbe2e62b2c62b6f3f5a16a6e30aa4e40821e
parentc14513fd07359c39e2e27c2e7d475ca522f03db5
Support passing lifetime'd enums to C

While this is generally unsafe, we have to do something for
`CandidateRouteHop`, which is passed to the scorer. Because its
incredibly performance-sensitive, forcing the bindings users to
take a performance hit just to make the scoring interface marginally
safer seems like a bad trade-off.
c-bindings-gen/src/blocks.rs
c-bindings-gen/src/main.rs