Comment Comment by marler8997 It's a bit more than your typical "interop via C". With a "sized opaque" type you actually can stack allocate C++ values in Zig (and vice versa stack allocate Zig values in C++), i.e.fn stackExample() void { var some_cpp_type: c.SomeCppType = undefined; c.some_cpp_type_ctor(&some_cpp_type); defer c.some_cpp_type_dtor(&some_cpp_type); // ... } parent marler8997 1 year ago
fn stackExample() void {