forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 3
/
coveragecpp.cpp
38 lines (32 loc) · 898 Bytes
/
coveragecpp.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
extern "C" {
// Include the complete public API to verify everything compiles as C++.
#include <py/gc.h>
#include <py/obj.h>
#include <py/objarray.h>
#include <py/objexcept.h>
#include <py/objfun.h>
#include <py/objgenerator.h>
#include <py/objint.h>
#include <py/objlist.h>
#include <py/objmodule.h>
#include <py/objnamedtuple.h>
#include <py/objstr.h>
#include <py/objstringio.h>
#include <py/objtuple.h>
#include <py/objtype.h>
#include <py/runtime.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