summaryrefslogtreecommitdiff
path: root/py/builtinimport.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/builtinimport.c')
-rw-r--r--py/builtinimport.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 002a5cb85..0611926fd 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -57,7 +57,7 @@
// uses mp_vfs_import_stat) to also search frozen modules. Given an exact
// path to a file or directory (e.g. "foo/bar", foo/bar.py" or "foo/bar.mpy"),
// will return whether the path is a file, directory, or doesn't exist.
-STATIC mp_import_stat_t stat_path(vstr_t *path) {
+static mp_import_stat_t stat_path(vstr_t *path) {
const char *str = vstr_null_terminated_str(path);
#if MICROPY_MODULE_FROZEN
// Only try and load as a frozen module if it starts with .frozen/.
@@ -75,7 +75,7 @@ STATIC mp_import_stat_t stat_path(vstr_t *path) {
// argument. This is the logic that makes .py files take precedent over .mpy
// files. This uses stat_path above, rather than mp_import_stat directly, so
// that the .frozen path prefix is handled.
-STATIC mp_import_stat_t stat_file_py_or_mpy(vstr_t *path) {
+static mp_import_stat_t stat_file_py_or_mpy(vstr_t *path) {
mp_import_stat_t stat = stat_path(path);
if (stat == MP_IMPORT_STAT_FILE) {
return stat;
@@ -99,7 +99,7 @@ STATIC mp_import_stat_t stat_file_py_or_mpy(vstr_t *path) {
// or "foo/bar.(m)py" in either the filesystem or frozen modules. If the
// result is a file, the path argument will be updated to include the file
// extension.
-STATIC mp_import_stat_t stat_module(vstr_t *path) {
+static mp_import_stat_t stat_module(vstr_t *path) {
mp_import_stat_t stat = stat_path(path);
DEBUG_printf("stat %s: %d\n", vstr_str(path), stat);
if (stat == MP_IMPORT_STAT_DIR) {
@@ -114,7 +114,7 @@ STATIC mp_import_stat_t stat_module(vstr_t *path) {
// Given a top-level module name, try and find it in each of the sys.path
// entries. Note: On success, the dest argument will be updated to the matching
// path (i.e. "<entry>/mod_name(.py)").
-STATIC mp_import_stat_t stat_top_level(qstr mod_name, vstr_t *dest) {
+static mp_import_stat_t stat_top_level(qstr mod_name, vstr_t *dest) {
DEBUG_printf("stat_top_level: '%s'\n", qstr_str(mod_name));
#if MICROPY_PY_SYS
size_t path_num;
@@ -152,7 +152,7 @@ STATIC mp_import_stat_t stat_top_level(qstr mod_name, vstr_t *dest) {
}
#if MICROPY_MODULE_FROZEN_STR || MICROPY_ENABLE_COMPILER
-STATIC void do_load_from_lexer(mp_module_context_t *context, mp_lexer_t *lex) {
+static void do_load_from_lexer(mp_module_context_t *context, mp_lexer_t *lex) {
#if MICROPY_PY___FILE__
qstr source_name = lex->source_name;
mp_store_attr(MP_OBJ_FROM_PTR(&context->module), MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name));
@@ -165,7 +165,7 @@ STATIC void do_load_from_lexer(mp_module_context_t *context, mp_lexer_t *lex) {
#endif
#if (MICROPY_HAS_FILE_READER && MICROPY_PERSISTENT_CODE_LOAD) || MICROPY_MODULE_FROZEN_MPY
-STATIC void do_execute_proto_fun(const mp_module_context_t *context, mp_proto_fun_t proto_fun, qstr source_name) {
+static void do_execute_proto_fun(const mp_module_context_t *context, mp_proto_fun_t proto_fun, qstr source_name) {
#if MICROPY_PY___FILE__
mp_store_attr(MP_OBJ_FROM_PTR(&context->module), MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name));
#else
@@ -196,7 +196,7 @@ STATIC void do_execute_proto_fun(const mp_module_context_t *context, mp_proto_fu
}
#endif
-STATIC void do_load(mp_module_context_t *module_obj, vstr_t *file) {
+static void do_load(mp_module_context_t *module_obj, vstr_t *file) {
#if MICROPY_MODULE_FROZEN || MICROPY_ENABLE_COMPILER || (MICROPY_PERSISTENT_CODE_LOAD && MICROPY_HAS_FILE_READER)
const char *file_str = vstr_null_terminated_str(file);
#endif
@@ -267,7 +267,7 @@ STATIC void do_load(mp_module_context_t *module_obj, vstr_t *file) {
// Convert a relative (to the current module) import, going up "level" levels,
// into an absolute import.
-STATIC void evaluate_relative_import(mp_int_t level, const char **module_name, size_t *module_name_len) {
+static void evaluate_relative_import(mp_int_t level, const char **module_name, size_t *module_name_len) {
// What we want to do here is to take the name of the current module,
// remove <level> trailing components, and concatenate the passed-in
// module name.
@@ -350,7 +350,7 @@ typedef struct _nlr_jump_callback_node_unregister_module_t {
qstr name;
} nlr_jump_callback_node_unregister_module_t;
-STATIC void unregister_module_from_nlr_jump_callback(void *ctx_in) {
+static void unregister_module_from_nlr_jump_callback(void *ctx_in) {
nlr_jump_callback_node_unregister_module_t *ctx = ctx_in;
mp_map_t *mp_loaded_modules_map = &MP_STATE_VM(mp_loaded_modules_dict).map;
mp_map_lookup(mp_loaded_modules_map, MP_OBJ_NEW_QSTR(ctx->name), MP_MAP_LOOKUP_REMOVE_IF_FOUND);
@@ -363,7 +363,7 @@ STATIC void unregister_module_from_nlr_jump_callback(void *ctx_in) {
// attribute on it) (or MP_OBJ_NULL for top-level).
// override_main: Whether to set the __name__ to "__main__" (and use __main__
// for the actual path).
-STATIC mp_obj_t process_import_at_level(qstr full_mod_name, qstr level_mod_name, mp_obj_t outer_module_obj, bool override_main) {
+static mp_obj_t process_import_at_level(qstr full_mod_name, qstr level_mod_name, mp_obj_t outer_module_obj, bool override_main) {
// Immediately return if the module at this level is already loaded.
mp_map_elem_t *elem;