3 ms·
It's for C++ consumers of C libraries. Doesn't matter for Python <-> Rust.
by loeg 10y ago
It's for C++ consumers of C libraries. Doesn't matter for Python <-> Rust.
- the_mitsuhiko 10y agoThere is an extern C in Rust as well however which should enforce c calling conventions.
- loeg 10y agoRight, but `extern "C"` is for C++ programs using C library headers directly. Rust doesn't use C headers directly, I think, so it wouldn't need this kludge.
- tomjakubowski 10y agoI think you may be confused. The original commenter wasn't referring to use of 'extern "C"' in the C header file, but to its (lack of) use in the Rust source that defines those functions.
- deleted 10y ago[deleted]