X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Fmain.rs;h=f427b5063c5165e90f4a0a92574ac70e1395742f;hb=1479016331a6f03d9aab2aee620c86b71232ba9d;hp=746952e14200da595dcbbe00b663210754396750;hpb=ce56152cf5dfb7cc7f63943038094d41526d6b17;p=rust-lightning diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index 746952e1..f427b506 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -454,7 +454,7 @@ fn writeln_opaque(w: &mut W, ident: &syn::Ident, struct_name: writeln!(w, "#[allow(unused)]").unwrap(); writeln!(w, "/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy").unwrap(); writeln!(w, "impl {} {{", struct_name).unwrap(); - writeln!(w, "\tpub(crate) fn take_ptr(mut self) -> *mut native{} {{", struct_name).unwrap(); + writeln!(w, "\tpub(crate) fn take_inner(mut self) -> *mut native{} {{", struct_name).unwrap(); writeln!(w, "\t\tassert!(self.is_owned);").unwrap(); writeln!(w, "\t\tlet ret = self.inner;").unwrap(); writeln!(w, "\t\tself.inner = std::ptr::null_mut();").unwrap();