X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=d6a2c989e1ab21694882fd0c713d311f655800c4;hb=74cf2dd9adbd575602eab690aea27d9eb3f810d1;hp=bf591a2673e752dc9058a6576424d9bd25298e5b;hpb=a54b230e846b563acdb949eef2e6bbf9937b1831;p=rust-lightning diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index bf591a267..d6a2c989e 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -719,7 +719,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { /// Returns the module path in the generated mapping crate to the containers which we generate /// when writing to CrateTypes::template_file. - fn generated_container_path() -> &'static str { + pub fn generated_container_path() -> &'static str { "crate::c_types::derived" } /// Returns the module path in the generated mapping crate to the container templates, which @@ -906,7 +906,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { self.declared.get(ident) } /// Returns true if the object at the given path is mapped as X { inner: *mut origX, .. }. - fn c_type_has_inner_from_path(&self, full_path: &str) -> bool{ + pub fn c_type_has_inner_from_path(&self, full_path: &str) -> bool{ self.crate_types.opaques.get(full_path).is_some() } @@ -1053,7 +1053,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { pub fn write_rust_type(&self, w: &mut W, generics: Option<&GenericTypes>, t: &syn::Type) { match t { syn::Type::Path(p) => { - if p.qself.is_some() || p.path.leading_colon.is_some() { + if p.qself.is_some() { unimplemented!(); } self.write_rust_path(w, generics, &p.path);