From 3c64a6c2358cfce2194c9db33890de03a5618984 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 2 May 2021 19:49:21 +0000 Subject: [PATCH] Update auto-generated bindings (without new version files) --- .../{rust_types.h => ldk_rust_types.h} | 0 lightning-c-bindings/include/lightning.h | 46 +++++++++++-------- lightning-c-bindings/src/lib.rs | 1 + 3 files changed, 27 insertions(+), 20 deletions(-) rename lightning-c-bindings/include/{rust_types.h => ldk_rust_types.h} (100%) diff --git a/lightning-c-bindings/include/rust_types.h b/lightning-c-bindings/include/ldk_rust_types.h similarity index 100% rename from lightning-c-bindings/include/rust_types.h rename to lightning-c-bindings/include/ldk_rust_types.h diff --git a/lightning-c-bindings/include/lightning.h b/lightning-c-bindings/include/lightning.h index 2527e65..60acaae 100644 --- a/lightning-c-bindings/include/lightning.h +++ b/lightning-c-bindings/include/lightning.h @@ -8,7 +8,7 @@ #include #include #include - +#include /** * An error when accessing the chain via [`Access`]. @@ -368,6 +368,25 @@ typedef enum LDKSiPrefix { LDKSiPrefix_Sentinel, } LDKSiPrefix; +/** + * A Rust str object, ie a reference to a UTF8-valid string. + * This is *not* null-terminated so cannot be used directly as a C string! + */ +typedef struct LDKStr { + /** + * A pointer to the string's bytes, in UTF8 encoding + */ + const uint8_t *chars; + /** + * The number of bytes (not characters!) pointed to by `chars` + */ + uintptr_t len; + /** + * Whether the data pointed to by `chars` should be freed or not. + */ + bool chars_is_owned; +} LDKStr; + /** * A serialized transaction, in (pointer, length) form. * @@ -431,25 +450,6 @@ typedef struct LDKTxOut { uint64_t value; } LDKTxOut; -/** - * A Rust str object, ie a reference to a UTF8-valid string. - * This is *not* null-terminated so cannot be used directly as a C string! - */ -typedef struct LDKStr { - /** - * A pointer to the string's bytes, in UTF8 encoding - */ - const uint8_t *chars; - /** - * The number of bytes (not characters!) pointed to by `chars` - */ - uintptr_t len; - /** - * Whether the data pointed to by `chars` should be freed or not. - */ - bool chars_is_owned; -} LDKStr; - /** @@ -8757,6 +8757,10 @@ extern const uint8_t TAG_PAYMENT_SECRET; extern const uint8_t TAG_FEATURES; +struct LDKStr _ldk_get_compiled_version(void); + +struct LDKStr _ldk_c_bindings_get_compiled_version(void); + /** * Frees the data buffer, if data_is_owned is set and datalen > 0. */ @@ -17664,3 +17668,5 @@ struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o); struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o); #endif /* LDK_C_BINDINGS_H */ + +#include diff --git a/lightning-c-bindings/src/lib.rs b/lightning-c-bindings/src/lib.rs index 3485c46..e4b62ba 100644 --- a/lightning-c-bindings/src/lib.rs +++ b/lightning-c-bindings/src/lib.rs @@ -16,6 +16,7 @@ #![allow(unused_parens)] #![allow(unused_unsafe)] #![allow(unused_braces)] +pub mod version; pub mod c_types; pub mod bitcoin; pub mod lightning; -- 2.30.2