projects
/
ldk-c-bindings
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update auto-generated bindings
[ldk-c-bindings]
/
lightning-c-bindings
/
src
/
lightning
/
util
/
logger.rs
diff --git
a/lightning-c-bindings/src/lightning/util/logger.rs
b/lightning-c-bindings/src/lightning/util/logger.rs
index 1e4051d05dc3a28eda4290cf71517c0a251508cf..452da100eac8fa90140a20160be9fe074b3a00ff 100644
(file)
--- a/
lightning-c-bindings/src/lightning/util/logger.rs
+++ b/
lightning-c-bindings/src/lightning/util/logger.rs
@@
-14,6
+14,7
@@
//! Each module may have its own Logger or share one.
use alloc::str::FromStr;
//! 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;
use core::ffi::c_void;
use core::convert::Infallible;
use bitcoin::hashes::Hash;
@@
-123,7
+124,7
@@
pub extern "C" fn Level_error() -> Level {
pub extern "C" fn Level_eq(a: &Level, b: &Level) -> bool {
if &a.to_native() == &b.to_native() { true } else { false }
}
pub extern "C" fn Level_eq(a: &Level, b: &Level) -> bool {
if &a.to_native() == &b.to_native() { true } else { false }
}
-///
Checks if two Levels contain equal inner contents
.
+///
Generates a non-cryptographic 64-bit hash of the Level
.
#[no_mangle]
pub extern "C" fn Level_hash(o: &Level) -> u64 {
// Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
#[no_mangle]
pub extern "C" fn Level_hash(o: &Level) -> u64 {
// Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
@@
-280,8
+281,7
@@
pub struct Logger {
}
unsafe impl Send for Logger {}
unsafe impl Sync for Logger {}
}
unsafe impl Send for Logger {}
unsafe impl Sync for Logger {}
-#[no_mangle]
-pub(crate) extern "C" fn Logger_clone_fields(orig: &Logger) -> Logger {
+pub(crate) fn Logger_clone_fields(orig: &Logger) -> Logger {
Logger {
this_arg: orig.this_arg,
log: Clone::clone(&orig.log),
Logger {
this_arg: orig.this_arg,
log: Clone::clone(&orig.log),
@@
-304,6
+304,11
@@
impl core::ops::Deref for Logger {
self
}
}
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) { }
/// Calls the free function if one is set
#[no_mangle]
pub extern "C" fn Logger_free(this_ptr: Logger) { }