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 to LDK 0.0.121
[ldk-c-bindings]
/
lightning-c-bindings
/
src
/
lightning
/
util
/
errors.rs
diff --git
a/lightning-c-bindings/src/lightning/util/errors.rs
b/lightning-c-bindings/src/lightning/util/errors.rs
index 08929c15c065c0a98cc382d223cc24417157726b..884c942b5016c357d29ffeef588de689d5c509b0 100644
(file)
--- a/
lightning-c-bindings/src/lightning/util/errors.rs
+++ b/
lightning-c-bindings/src/lightning/util/errors.rs
@@
-148,7
+148,8
@@
impl APIError {
}
}
#[allow(unused)]
}
}
#[allow(unused)]
- pub(crate) fn from_native(native: &nativeAPIError) -> Self {
+ pub(crate) fn from_native(native: &APIErrorImport) -> Self {
+ let native = unsafe { &*(native as *const _ as *const c_void as *const nativeAPIError) };
match native {
nativeAPIError::APIMisuseError {ref err, } => {
let mut err_nonref = Clone::clone(err);
match native {
nativeAPIError::APIMisuseError {ref err, } => {
let mut err_nonref = Clone::clone(err);
@@
-282,6
+283,9
@@
pub extern "C" fn APIError_incompatible_shutdown_script(script: crate::lightning
pub extern "C" fn APIError_eq(a: &APIError, b: &APIError) -> bool {
if &a.to_native() == &b.to_native() { true } else { false }
}
pub extern "C" fn APIError_eq(a: &APIError, b: &APIError) -> bool {
if &a.to_native() == &b.to_native() { true } else { false }
}
+/// Get a string which allows debug introspection of a APIError object
+pub extern "C" fn APIError_debug_str_void(o: *const c_void) -> Str {
+ alloc::format!("{:?}", unsafe { o as *const crate::lightning::util::errors::APIError }).into()}
#[no_mangle]
/// Serialize the APIError object into a byte array which can be read by APIError_read
pub extern "C" fn APIError_write(obj: &crate::lightning::util::errors::APIError) -> crate::c_types::derived::CVec_u8Z {
#[no_mangle]
/// Serialize the APIError object into a byte array which can be read by APIError_read
pub extern "C" fn APIError_write(obj: &crate::lightning::util::errors::APIError) -> crate::c_types::derived::CVec_u8Z {