circuitpython/ports/unix/coveragecpp.cpp
Dan Halbert 2dd33e3a8d wip: ports compile and pass smoke tests
tests/ not run yet.
Reduced some differences from upstream by changing some error messages and defining some preprocessor macros.
2025-06-10 21:53:41 -04:00

24 lines
555 B
C++

extern "C" {
// CIRCUITPY-CHANGE: do not include everything: it causes compilation warnings
#include "py/obj.h"
}
#if defined(MICROPY_UNIX_COVERAGE)
// Just to test building of C++ code.
static mp_obj_t extra_cpp_coverage_impl() {
return mp_const_none;
}
extern "C" {
mp_obj_t extra_cpp_coverage(void);
mp_obj_t extra_cpp_coverage(void) {
return extra_cpp_coverage_impl();
}
// This is extern to avoid name mangling.
extern const mp_obj_fun_builtin_fixed_t extra_cpp_coverage_obj = {{&mp_type_fun_builtin_0}, {extra_cpp_coverage}};
}
#endif