|
|
|
|
|
by marler8997
212 days ago
|
|
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);
// ...
}
|
|