mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 23:29:50 +00:00
0356d33acb
MSVC is hesitant about passing private fields in an extern "C" signature. Repro: struct Str1 { const char *ptr; size_t len; }; struct Str2 { private: const char *ptr; size_t len; }; extern "C" { Str1 str1(); Str2 str2(); } Warning from MSVC v19.27: warning C4190: 'str2' has C-linkage specified, but returns UDT 'Str2' which is incompatible with C |
||
---|---|---|
.. | ||
ffi | ||
ui | ||
BUCK | ||
BUILD | ||
compiletest.rs | ||
cxx_gen.rs | ||
test.rs | ||
unique_ptr.rs |