We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code
#[macro_use] extern crate cpp; cpp!{{ #include <cstdio> #include <memory> using namespace std; class A { public: int x, y; A(): x(42), y(47) {} ~A() { } }; }} #[repr(C)] #[derive(Debug)] pub struct A { pub _bindgen_opaque_blob: [u32; 2usize], } fn main() { loop { let x = unsafe { cpp!([] -> A as "A" { return A(); }) }; unsafe { cpp!([x as "A"] { printf("%d\n", x.x); printf("%d\n", x.y); }) }; } }
Produces seqfault. However when destructor is not present code runs correctly without segfault.
The text was updated successfully, but these errors were encountered:
I think this is the same issue as #18
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
This code
Produces seqfault. However when destructor is not present code runs correctly without segfault.
The text was updated successfully, but these errors were encountered: