Support passing `Option<&OpaqueStruct>` to C
[ldk-c-bindings] / c-bindings-gen / src / types.rs
index b13db9e648b91f0534733961a5e56d599ecd2a42..85ce3e9fc1472202f2b0cb55346169baaa141207 100644 (file)
@@ -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();