STATIC void mymodule_hello_print( const mp_print_t *print,
mp_obj_t self_in,
mp_print_kind_t kind ) {
// get a ptr to the C-struct of the object
mymodule_hello_obj_t *self = MP_OBJ_TO_PTR(self_in);
// print the number
printf ("Hello(%u)", self->hello_number);
}
Should be something like:
STATIC void mymodule_hello_print( const mp_print_t *print,
mp_obj_t self_in,
mp_print_kind_t kind ) {
// get a ptr to the C-struct of the object
mymodule_hello_obj_t *self = MP_OBJ_TO_PTR(self_in);
// print the number
mp_printf (print, "Hello(%u)", self->hello_number);
}
on "adding-module":
Should be something like: