]> git.bitcoin.ninja Git - ldk-c-bindings/commit
Allow generation of manual types in reference options
authorMatt Corallo <git@bluematt.me>
Sat, 22 Jul 2023 20:03:11 +0000 (20:03 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 28 Jul 2023 23:06:00 +0000 (23:06 +0000)
commit3e06be96893dc608b6de44f2041869873b56e41d
tree2622c80155daf0b7929f27b8f96c00e03f9500b0
parent5aaf753ce9c1b52d2b8ae46c93b0e57e7ac0f4fc
Allow generation of manual types in reference options

The limiting of supported types in `write_template_generics` isn't
super useful as its only called once per type - later uses of the
same type with the reference flag set or wiped doesn't change
anything. Still, it is relied on somewhat, so we can't drop it
entirely.

Now that we've moved more of the `[u8; 32]` newtypes to option
wrappers, failing for non-primitive references spuriously breaks.
Instead, we just allow it for manually-mapped types and let the
compiler complain if we do something invalid.
c-bindings-gen/src/types.rs