Skip to content

Commit

Permalink
fixup! Add UniquePtr::to_shared and SharedPtr::from_unmanaged
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed Feb 18, 2023
1 parent c691b4b commit f7dc455
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions gen/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1803,18 +1803,6 @@ fn write_shared_ptr(out: &mut OutFile, key: NamedImplKey) {
);
writeln!(out, "}}");
begin_function_definition(out);
writeln!(
out,
"void cxxbridge1$shared_ptr${}$from_unmanaged(::std::shared_ptr<{}>* ptr, void* data) noexcept {{",
instance, inner,
);
writeln!(
out,
"new (ptr) std::shared_ptr<{}>(static_cast<{}*>(data));",
inner, inner
);
writeln!(out, "}}");
begin_function_definition(out);
writeln!(
out,
"void cxxbridge1$shared_ptr${}$clone(::std::shared_ptr<{}> const &self, ::std::shared_ptr<{}> *ptr) noexcept {{",
Expand Down

0 comments on commit f7dc455

Please sign in to comment.