Skip to content

Commit 912e957

Browse files
hoihudpgeorge
authored andcommitted
docs/develop: Fix typos in C-module example for example_add_ints.
1 parent ea95bdc commit 912e957

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/develop/cmodules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Directory::
7474
#define MODULE_EXAMPLE_ENABLED (1)
7575
7676
// This is the function which will be called from Python as example.add_ints(a, b).
77-
STATIC mp_obj_t example_add_ints(mp_obj_t a_obj, mp_obj_tab_obj) {
77+
STATIC mp_obj_t example_add_ints(mp_obj_t a_obj, mp_obj_t b_obj) {
7878
// Extract the ints from the micropython input objects
7979
int a = mp_obj_get_int(a_obj);
8080
int b = mp_obj_get_int(b_obj);
@@ -83,7 +83,7 @@ Directory::
8383
return mp_obj_new_int(a + b);
8484
}
8585
// Define a Python reference to the function above
86-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(example_add_ints_obj, example_add_ints);
86+
STATIC MP_DEFINE_CONST_FUN_OBJ_2(example_add_ints_obj, example_add_ints);
8787
8888
// Define all properties of the example module.
8989
// Table entries are key/value pairs of the attribute name (a string)

0 commit comments

Comments
 (0)