mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
5b0ea77c62
The -Wmissing-prototypes Clang warning (or -Wmissing-declarations on GCC) is very useful to avoid accidents where a function definition in a source file doesn't match the corresponding declaration in a header file, as it would warn already during compilation and not much later during link time. Unfortunately this means that exported functions defined only in the source file (usually the ones annotated with `extern "C"`) will cause this warning to be emitted too (on Clang, GCC has a slightly different behavior with -Wmissing-declarations and doesn't warn here). This fixes the warning by providing a declaration right before the definition. |
||
---|---|---|
.. | ||
pybind11 |