Skip to content

Commit 1e1a800

Browse files
committed
change remaining STATIC to static
1 parent ac7e15f commit 1e1a800

69 files changed

Lines changed: 200 additions & 206 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

extmod/modasyncio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,14 @@ static mp_obj_t task_cancel(mp_obj_t self_in) {
249249
static MP_DEFINE_CONST_FUN_OBJ_1(task_cancel_obj, task_cancel);
250250

251251
// CIRCUITPY-CHANGE: CircuitPython provides __await__().
252-
STATIC mp_obj_t task_getiter(mp_obj_t self_in, mp_obj_iter_buf_t *iter_buf);
252+
static mp_obj_t task_getiter(mp_obj_t self_in, mp_obj_iter_buf_t *iter_buf);
253253

254-
STATIC mp_obj_t task_await(mp_obj_t self_in) {
254+
static mp_obj_t task_await(mp_obj_t self_in) {
255255
return task_getiter(self_in, NULL);
256256
}
257-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(task_await_obj, task_await);
257+
static MP_DEFINE_CONST_FUN_OBJ_1(task_await_obj, task_await);
258258

259-
STATIC void task_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
259+
static void task_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
260260
mp_obj_task_t *self = MP_OBJ_TO_PTR(self_in);
261261
if (dest[0] == MP_OBJ_NULL) {
262262
// Load

extmod/modzlib.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ typedef struct _mp_obj_decompio_t {
4949
bool eof;
5050
} mp_obj_decompio_t;
5151

52-
STATIC int read_src_stream(TINF_DATA *data) {
52+
static int read_src_stream(TINF_DATA *data) {
5353
byte *p = (void *)data;
5454
p -= offsetof(mp_obj_decompio_t, decomp);
5555
mp_obj_decompio_t *self = (mp_obj_decompio_t *)p;
@@ -67,7 +67,7 @@ STATIC int read_src_stream(TINF_DATA *data) {
6767
return c;
6868
}
6969

70-
STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
70+
static mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
7171
mp_arg_check_num(n_args, n_kw, 1, 2, false);
7272
mp_get_stream_raise(args[0], MP_STREAM_OP_READ);
7373
mp_obj_decompio_t *o = mp_obj_malloc(mp_obj_decompio_t, type);
@@ -106,7 +106,7 @@ STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size
106106
return MP_OBJ_FROM_PTR(o);
107107
}
108108

109-
STATIC mp_uint_t decompio_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *errcode) {
109+
static mp_uint_t decompio_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *errcode) {
110110
mp_obj_decompio_t *o = MP_OBJ_TO_PTR(o_in);
111111
if (o->eof) {
112112
return 0;
@@ -127,21 +127,21 @@ STATIC mp_uint_t decompio_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *er
127127
}
128128

129129
#if !MICROPY_ENABLE_DYNRUNTIME
130-
STATIC const mp_rom_map_elem_t decompio_locals_dict_table[] = {
130+
static const mp_rom_map_elem_t decompio_locals_dict_table[] = {
131131
{ MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_stream_read_obj) },
132132
{ MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto_obj) },
133133
{ MP_ROM_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj) },
134134
};
135135

136-
STATIC MP_DEFINE_CONST_DICT(decompio_locals_dict, decompio_locals_dict_table);
136+
static MP_DEFINE_CONST_DICT(decompio_locals_dict, decompio_locals_dict_table);
137137
#endif
138138

139-
STATIC const mp_stream_p_t decompio_stream_p = {
139+
static const mp_stream_p_t decompio_stream_p = {
140140
.read = decompio_read,
141141
};
142142

143143
#if !MICROPY_ENABLE_DYNRUNTIME
144-
STATIC MP_DEFINE_CONST_OBJ_TYPE(
144+
static MP_DEFINE_CONST_OBJ_TYPE(
145145
decompio_type,
146146
MP_QSTR_DecompIO,
147147
MP_TYPE_FLAG_NONE,
@@ -151,7 +151,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
151151
);
152152
#endif
153153

154-
STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
154+
static mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
155155
mp_obj_t data = args[0];
156156
mp_buffer_info_t bufinfo;
157157
mp_get_buffer_raise(data, &bufinfo, MP_BUFFER_READ);
@@ -213,16 +213,16 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
213213
error:
214214
mp_raise_type_arg(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st));
215215
}
216-
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress);
216+
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress);
217217

218218
#if !MICROPY_ENABLE_DYNRUNTIME
219-
STATIC const mp_rom_map_elem_t mp_module_uzlib_globals_table[] = {
219+
static const mp_rom_map_elem_t mp_module_uzlib_globals_table[] = {
220220
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uzlib) },
221221
{ MP_ROM_QSTR(MP_QSTR_decompress), MP_ROM_PTR(&mod_uzlib_decompress_obj) },
222222
{ MP_ROM_QSTR(MP_QSTR_DecompIO), MP_ROM_PTR(&decompio_type) },
223223
};
224224

225-
STATIC MP_DEFINE_CONST_DICT(mp_module_uzlib_globals, mp_module_uzlib_globals_table);
225+
static MP_DEFINE_CONST_DICT(mp_module_uzlib_globals, mp_module_uzlib_globals_table);
226226

227227
const mp_obj_module_t mp_module_uzlib = {
228228
.base = { &mp_type_module },

extmod/vfs_fat.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
// CIRCUITPY-CHANGE
5959
// Factoring this common call saves about 90 bytes.
60-
STATIC NORETURN void mp_raise_OSError_fresult(FRESULT res) {
60+
static NORETURN void mp_raise_OSError_fresult(FRESULT res) {
6161
mp_raise_OSError(fresult_to_errno_table[res]);
6262
}
6363

@@ -102,14 +102,14 @@ static mp_obj_t fat_vfs_make_new(const mp_obj_type_t *type, size_t n_args, size_
102102
}
103103

104104
// CIRCUITPY-CHANGE
105-
STATIC void verify_fs_writable(fs_user_mount_t *vfs) {
105+
static void verify_fs_writable(fs_user_mount_t *vfs) {
106106
if (!filesystem_is_writable_by_python(vfs)) {
107107
mp_raise_OSError(MP_EROFS);
108108
}
109109
}
110110

111111
#if _FS_REENTRANT
112-
STATIC mp_obj_t fat_vfs_del(mp_obj_t self_in) {
112+
static mp_obj_t fat_vfs_del(mp_obj_t self_in) {
113113
mp_obj_fat_vfs_t *self = MP_OBJ_TO_PTR(self_in);
114114
// f_umount only needs to be called to release the sync object
115115
f_umount(&self->fatfs);
@@ -447,7 +447,7 @@ static mp_obj_t vfs_fat_umount(mp_obj_t self_in) {
447447
// keep the FAT filesystem mounted internally so the VFS methods can still be used
448448
return mp_const_none;
449449
}
450-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(fat_vfs_umount_obj, vfs_fat_umount);
450+
static MP_DEFINE_CONST_FUN_OBJ_1(fat_vfs_umount_obj, vfs_fat_umount);
451451

452452
// CIRCUITPY-CHANGE
453453
static mp_obj_t vfs_fat_utime(mp_obj_t vfs_in, mp_obj_t path_in, mp_obj_t times_in) {

mpy-cross/fmode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Workaround for setting file translation mode: we must distinguish toolsets
1212
// since mingw has no _set_fmode, and altering msvc's _fmode directly has no effect
13-
STATIC int set_fmode_impl(int mode) {
13+
static int set_fmode_impl(int mode) {
1414
#ifndef _MSC_VER
1515
_fmode = mode;
1616
return 0;

ports/espressif/boards/esp32-wrover-dev-cam/pins.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
CIRCUITPY_BOARD_BUS_SINGLETON(sscb_i2c, i2c, 2) // Camera sensor
55

6-
STATIC const mp_rom_obj_tuple_t camera_data_tuple = {
6+
static const mp_rom_obj_tuple_t camera_data_tuple = {
77
// The order matters. They must be ordered from low to high (Y2, Y3 .. Y9). Do not include any of the control pins in here.
88
{&mp_type_tuple},
99
8,
@@ -19,7 +19,7 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = {
1919
}
2020
};
2121

22-
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
22+
static const mp_rom_map_elem_t board_module_globals_table[] = {
2323
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
2424

2525
// Red LED labelled IO2 on the front of the board

ports/espressif/boards/espressif_esp8684_devkitc_02_n4/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "shared-bindings/board/__init__.h"
22

3-
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3+
static const mp_rom_map_elem_t board_module_globals_table[] = {
44
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
55

66
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },

ports/espressif/boards/nodemcu_esp32c2/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "shared-bindings/board/__init__.h"
22

3-
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3+
static const mp_rom_map_elem_t board_module_globals_table[] = {
44
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
55

66
// Module on top, from top to bottom, left to right

ports/espressif/boards/seeed_xiao_esp32c6/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "shared-bindings/board/__init__.h"
22

3-
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3+
static const mp_rom_map_elem_t board_module_globals_table[] = {
44
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
55

66
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) },

ports/espressif/boards/ttgo_t8_v1_7/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "shared-bindings/board/__init__.h"
22

3-
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3+
static const mp_rom_map_elem_t board_module_globals_table[] = {
44
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
55

66
// External pins are in silkscreen order, from top to bottom, left side, then right side

ports/espressif/boards/waveshare_esp32_s3_tiny/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include "shared-bindings/board/__init__.h"
88

9-
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
9+
static const mp_rom_map_elem_t board_module_globals_table[] = {
1010
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
1111

1212
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },

0 commit comments

Comments
 (0)