summaryrefslogtreecommitdiff
path: root/docs/develop
diff options
context:
space:
mode:
Diffstat (limited to 'docs/develop')
-rw-r--r--docs/develop/compiler.rst4
-rw-r--r--docs/develop/library.rst6
-rw-r--r--docs/develop/natmod.rst6
-rw-r--r--docs/develop/porting.rst8
4 files changed, 12 insertions, 12 deletions
diff --git a/docs/develop/compiler.rst b/docs/develop/compiler.rst
index 00cc90f81..0c25ad3a0 100644
--- a/docs/develop/compiler.rst
+++ b/docs/develop/compiler.rst
@@ -98,7 +98,7 @@ Then also edit ``py/lexer.c`` to add the new keyword literal text:
.. code-block:: c
:emphasize-lines: 12
- STATIC const char *const tok_kw[] = {
+ static const char *const tok_kw[] = {
...
"or",
"pass",
@@ -301,7 +301,7 @@ code statement:
.. code-block:: c
- STATIC void emit_native_unary_op(emit_t *emit, mp_unary_op_t op) {
+ static void emit_native_unary_op(emit_t *emit, mp_unary_op_t op) {
vtype_kind_t vtype;
emit_pre_pop_reg(emit, &vtype, REG_ARG_2);
if (vtype == VTYPE_PYOBJ) {
diff --git a/docs/develop/library.rst b/docs/develop/library.rst
index c2a86ea16..830211d81 100644
--- a/docs/develop/library.rst
+++ b/docs/develop/library.rst
@@ -48,16 +48,16 @@ hypothetical new module ``subsystem`` in the file ``modsubsystem.c``:
#if MICROPY_PY_SUBSYSTEM
// info()
- STATIC mp_obj_t py_subsystem_info(void) {
+ static mp_obj_t py_subsystem_info(void) {
return MP_OBJ_NEW_SMALL_INT(42);
}
MP_DEFINE_CONST_FUN_OBJ_0(subsystem_info_obj, py_subsystem_info);
- STATIC const mp_rom_map_elem_t mp_module_subsystem_globals_table[] = {
+ static const mp_rom_map_elem_t mp_module_subsystem_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_subsystem) },
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&subsystem_info_obj) },
};
- STATIC MP_DEFINE_CONST_DICT(mp_module_subsystem_globals, mp_module_subsystem_globals_table);
+ static MP_DEFINE_CONST_DICT(mp_module_subsystem_globals, mp_module_subsystem_globals_table);
const mp_obj_module_t mp_module_subsystem = {
.base = { &mp_type_module },
diff --git a/docs/develop/natmod.rst b/docs/develop/natmod.rst
index 6d15f867b..502ea1c4c 100644
--- a/docs/develop/natmod.rst
+++ b/docs/develop/natmod.rst
@@ -128,7 +128,7 @@ The file ``factorial.c`` contains:
#include "py/dynruntime.h"
// Helper function to compute factorial
- STATIC mp_int_t factorial_helper(mp_int_t x) {
+ static mp_int_t factorial_helper(mp_int_t x) {
if (x == 0) {
return 1;
}
@@ -136,7 +136,7 @@ The file ``factorial.c`` contains:
}
// This is the function which will be called from Python, as factorial(x)
- STATIC mp_obj_t factorial(mp_obj_t x_obj) {
+ static mp_obj_t factorial(mp_obj_t x_obj) {
// Extract the integer from the MicroPython input object
mp_int_t x = mp_obj_get_int(x_obj);
// Calculate the factorial
@@ -145,7 +145,7 @@ The file ``factorial.c`` contains:
return mp_obj_new_int(result);
}
// Define a Python reference to the function above
- STATIC MP_DEFINE_CONST_FUN_OBJ_1(factorial_obj, factorial);
+ static MP_DEFINE_CONST_FUN_OBJ_1(factorial_obj, factorial);
// This is the entry point and is called when the module is imported
mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *args) {
diff --git a/docs/develop/porting.rst b/docs/develop/porting.rst
index 09e61d5d9..99725e100 100644
--- a/docs/develop/porting.rst
+++ b/docs/develop/porting.rst
@@ -262,17 +262,17 @@ To add a custom module like ``myport``, first add the module definition in a fil
#include "py/runtime.h"
- STATIC mp_obj_t myport_info(void) {
+ static mp_obj_t myport_info(void) {
mp_printf(&mp_plat_print, "info about my port\n");
return mp_const_none;
}
- STATIC MP_DEFINE_CONST_FUN_OBJ_0(myport_info_obj, myport_info);
+ static MP_DEFINE_CONST_FUN_OBJ_0(myport_info_obj, myport_info);
- STATIC const mp_rom_map_elem_t myport_module_globals_table[] = {
+ static const mp_rom_map_elem_t myport_module_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_myport) },
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&myport_info_obj) },
};
- STATIC MP_DEFINE_CONST_DICT(myport_module_globals, myport_module_globals_table);
+ static MP_DEFINE_CONST_DICT(myport_module_globals, myport_module_globals_table);
const mp_obj_module_t myport_module = {
.base = { &mp_type_module },