Update auto-generated bindings to LDK 0.0.118
[ldk-c-bindings] / lightning-c-bindings / src / lightning / util / logger.rs
index 651255bb336930203cf5cc843a3fc9985387db2d..645fafa555659b201762d1c52aeb2c6c4e9a07a3 100644 (file)
@@ -14,6 +14,7 @@
 //! Each module may have its own Logger or share one.
 
 use alloc::str::FromStr;
+use alloc::string::String;
 use core::ffi::c_void;
 use core::convert::Infallible;
 use bitcoin::hashes::Hash;
@@ -93,6 +94,16 @@ impl Level {
 pub extern "C" fn Level_clone(orig: &Level) -> Level {
        orig.clone()
 }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn Level_clone_void(this_ptr: *const c_void) -> *mut c_void {
+       Box::into_raw(Box::new(unsafe { (*(this_ptr as *const Level)).clone() })) as *mut c_void
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn Level_free_void(this_ptr: *mut c_void) {
+       let _ = unsafe { Box::from_raw(this_ptr as *mut Level) };
+}
 #[no_mangle]
 /// Utility method to constructs a new Gossip-variant Level
 pub extern "C" fn Level_gossip() -> Level {
@@ -259,7 +270,7 @@ impl Clone for Record {
 #[allow(unused)]
 /// Used only if an object of this type is returned as a trait impl by a method
 pub(crate) extern "C" fn Record_clone_void(this_ptr: *const c_void) -> *mut c_void {
-       Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeRecord)).clone() })) as *mut c_void
+       Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeRecord)).clone() })) as *mut c_void
 }
 #[no_mangle]
 /// Creates a copy of the Record
@@ -280,8 +291,8 @@ pub struct Logger {
 }
 unsafe impl Send for Logger {}
 unsafe impl Sync for Logger {}
-#[no_mangle]
-pub(crate) extern "C" fn Logger_clone_fields(orig: &Logger) -> Logger {
+#[allow(unused)]
+pub(crate) fn Logger_clone_fields(orig: &Logger) -> Logger {
        Logger {
                this_arg: orig.this_arg,
                log: Clone::clone(&orig.log),
@@ -304,6 +315,11 @@ impl core::ops::Deref for Logger {
                self
        }
 }
+impl core::ops::DerefMut for Logger {
+       fn deref_mut(&mut self) -> &mut Self {
+               self
+       }
+}
 /// Calls the free function if one is set
 #[no_mangle]
 pub extern "C" fn Logger_free(this_ptr: Logger) { }