X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=029fc63f807b721c9add26e21488d69c86f9c62c;hb=8dc4d5c556cafa326969474c17f34c77e8abcc0c;hp=b13db9e648b91f0534733961a5e56d599ecd2a42;hpb=c7b284ef5deb5af4b99e64b7c7e1b7d01d7ae33b;p=ldk-c-bindings diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index b13db9e..029fc63 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -668,7 +668,7 @@ impl<'mod_lifetime, 'crate_lft: 'mod_lifetime> ImportResolver<'mod_lifetime, 'cr // Now that we've resolved the path to the path as-imported, check whether the path // is actually a pub(.*) use statement and map it to the real path. let path_tmp = path.clone(); - let crate_name = path_tmp.splitn(1, "::").next().unwrap(); + let crate_name = path_tmp.splitn(2, "::").next().unwrap(); let mut module_riter = path_tmp.rsplitn(2, "::"); let obj = module_riter.next().unwrap(); if let Some(module_path) = module_riter.next() { @@ -2377,7 +2377,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { write!(w, "let mut local_{}{} = ", ident, if (!to_c && needs_ref_map) || (to_c && $container_type == "Option" && contains_slice) {"_base"} else { "" }).unwrap(); if prefix_location == ContainerPrefixLocation::OutsideConv { - var_prefix(w, $args_iter().next().unwrap(), generics, is_ref, ptr_for_ref, true); + var_prefix(w, $args_iter().next().unwrap(), generics, is_ref, true, true); } write!(w, "{}{}", prefix, var).unwrap();