Update auto-generated bindings to match latest upstream
[ldk-c-bindings] / lightning-c-bindings / src / lightning / routing / router.rs
index 9479bc97183fd53817c78822f83a63897ad4898d..484665971e3bf9cd2515131517bad96736410b1e 100644 (file)
@@ -400,6 +400,15 @@ pub extern "C" fn RouteHintHop_new(mut src_node_id_arg: crate::c_types::PublicKe
                htlc_maximum_msat: local_htlc_maximum_msat_arg,
        })), is_owned: true }
 }
+/// Checks if two RouteHintHops contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn RouteHintHop_eq(a: &RouteHintHop, b: &RouteHintHop) -> bool {
+       if a.inner == b.inner { return true; }
+       if a.inner.is_null() || b.inner.is_null() { return false; }
+       if unsafe { &*a.inner } == unsafe { &*b.inner } { true } else { false }
+}
 impl Clone for RouteHintHop {
        fn clone(&self) -> Self {
                Self {