25c4563f26
Add working example code to provide a starting point for users with files that they can just copy, and include the modules in the coverage test to verify the complete user C module build functionality. The cexample module uses the code originally found in cmodules.rst, which has been updated to reflect this and partially rewritten with more complete information.
6 lines
190 B
C
6 lines
190 B
C
// Include MicroPython API.
|
|
#include "py/runtime.h"
|
|
|
|
// Declare the function we'll make available in Python as cppexample.cppfunc().
|
|
extern mp_obj_t cppfunc(mp_obj_t a_obj, mp_obj_t b_obj);
|