Skip to content

Commit 4e7c1a4

Browse files
committed
Rename make_new's parameter to all_args
.. and fix two straggling modules that weren't updated at all. Maybe they're not included in any builds?
1 parent 132107c commit 4e7c1a4

Some content is hidden

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

75 files changed

+150
-151
lines changed

extmod/vfs_lfsx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ const char *MP_VFS_LFSx(make_path)(MP_OBJ_VFS_LFSx * self, mp_obj_t path_in) {
113113
return path;
114114
}
115115

116-
STATIC mp_obj_t MP_VFS_LFSx(make_new)(const mp_obj_type_t * type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
116+
STATIC mp_obj_t MP_VFS_LFSx(make_new)(const mp_obj_type_t * type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
117117
mp_arg_val_t args[MP_ARRAY_SIZE(lfs_make_allowed_args)];
118-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(lfs_make_allowed_args), lfs_make_allowed_args, args);
118+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(lfs_make_allowed_args), lfs_make_allowed_args, args);
119119

120120
MP_OBJ_VFS_LFSx *self = m_new0(MP_OBJ_VFS_LFSx, 1);
121121
self->base.type = type;

ports/raspberrypi/bindings/rp2pio/StateMachine.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
//| ...
139139
//|
140140

141-
STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
141+
STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
142142
rp2pio_statemachine_obj_t *self = m_new_obj(rp2pio_statemachine_obj_t);
143143
self->base.type = &rp2pio_statemachine_type;
144144
enum { ARG_program, ARG_frequency, ARG_init,
@@ -191,7 +191,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n
191191
{ MP_QSTR_user_interruptible, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} },
192192
};
193193
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
194-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
194+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
195195

196196
mp_buffer_info_t bufinfo;
197197
mp_get_buffer_raise(args[ARG_program].u_obj, &bufinfo, MP_BUFFER_READ);

shared-bindings/_bleio/Adapter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
//| """
8282
//| ...
8383
//|
84-
STATIC mp_obj_t bleio_adapter_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
84+
STATIC mp_obj_t bleio_adapter_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
8585
#if CIRCUITPY_BLEIO_HCI
8686
bleio_adapter_obj_t *self = common_hal_bleio_allocate_adapter_or_raise();
8787

@@ -93,7 +93,7 @@ STATIC mp_obj_t bleio_adapter_make_new(const mp_obj_type_t *type, size_t n_args,
9393
};
9494

9595
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
96-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
96+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
9797

9898
busio_uart_obj_t *uart = args[ARG_uart].u_obj;
9999
if (!mp_obj_is_type(uart, &busio_uart_type)) {

shared-bindings/_bleio/Address.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
//| `RANDOM_PRIVATE_RESOLVABLE`, or `RANDOM_PRIVATE_NON_RESOLVABLE`."""
4848
//| ...
4949
//|
50-
STATIC mp_obj_t bleio_address_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
50+
STATIC mp_obj_t bleio_address_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
5151
enum { ARG_address, ARG_address_type };
5252
static const mp_arg_t allowed_args[] = {
5353
{ MP_QSTR_address, MP_ARG_OBJ | MP_ARG_REQUIRED },
5454
{ MP_QSTR_address_type, MP_ARG_INT, {.u_int = BLEIO_ADDRESS_TYPE_PUBLIC } },
5555
};
5656

5757
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
58-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
58+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
5959

6060
bleio_address_obj_t *self = m_new_obj(bleio_address_obj_t);
6161
self->base.type = &bleio_address_type;

shared-bindings/_bleio/CharacteristicBuffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ STATIC void raise_error_if_not_connected(bleio_characteristic_buffer_obj_t *self
5757
//| Must be >= 1."""
5858
//| ...
5959
//|
60-
STATIC mp_obj_t bleio_characteristic_buffer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
60+
STATIC mp_obj_t bleio_characteristic_buffer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
6161
enum { ARG_characteristic, ARG_timeout, ARG_buffer_size, };
6262
static const mp_arg_t allowed_args[] = {
6363
{ MP_QSTR_characteristic, MP_ARG_REQUIRED | MP_ARG_OBJ },
@@ -66,7 +66,7 @@ STATIC mp_obj_t bleio_characteristic_buffer_make_new(const mp_obj_type_t *type,
6666
};
6767

6868
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
69-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
69+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
7070

7171
const mp_obj_t characteristic = args[ARG_characteristic].u_obj;
7272

shared-bindings/_bleio/PacketBuffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
//| (Remote characteristics may not have the correct length.)"""
6161
//| ...
6262
//|
63-
STATIC mp_obj_t bleio_packet_buffer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
63+
STATIC mp_obj_t bleio_packet_buffer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
6464
enum { ARG_characteristic, ARG_buffer_size, ARG_max_packet_size };
6565
static const mp_arg_t allowed_args[] = {
6666
{ MP_QSTR_characteristic, MP_ARG_REQUIRED | MP_ARG_OBJ },
@@ -69,7 +69,7 @@ STATIC mp_obj_t bleio_packet_buffer_make_new(const mp_obj_type_t *type, size_t n
6969
};
7070

7171
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
72-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
72+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
7373

7474
const mp_obj_t characteristic = args[ARG_characteristic].u_obj;
7575

shared-bindings/_bleio/Service.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848
//| :return: the new Service"""
4949
//| ...
5050
//|
51-
STATIC mp_obj_t bleio_service_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
51+
STATIC mp_obj_t bleio_service_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
5252
enum { ARG_uuid, ARG_secondary };
5353
static const mp_arg_t allowed_args[] = {
5454
{ MP_QSTR_uuid, MP_ARG_REQUIRED | MP_ARG_OBJ },
5555
{ MP_QSTR_secondary, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
5656
};
5757

5858
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
59-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
59+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
6060

6161
const mp_obj_t uuid_obj = args[ARG_uuid].u_obj;
6262
if (!mp_obj_is_type(uuid_obj, &bleio_uuid_type)) {

shared-bindings/_bleio/UUID.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@
5151
//| :type value: int, ~_typing.ReadableBuffer or str"""
5252
//| ...
5353
//|
54-
STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
54+
STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
5555
mp_arg_check_num(n_args, n_kw, 1, 1, false);
5656

5757
bleio_uuid_obj_t *self = m_new_obj(bleio_uuid_obj_t);
5858
self->base.type = type;
5959

60-
const mp_obj_t value = pos_args[0];
60+
const mp_obj_t value = all_args[0];
6161
uint8_t uuid128[16];
6262

6363
if (mp_obj_is_int(value)) {

shared-bindings/_pew/PewPew.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@
6262
//| buttons are connected to rows of the matrix)."""
6363
//| ...
6464
//|
65-
STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw,
66-
const mp_obj_t *pos_args) {
65+
STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
6766
enum { ARG_buffer, ARG_rows, ARG_cols, ARG_buttons };
6867
static const mp_arg_t allowed_args[] = {
6968
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED },
@@ -72,7 +71,7 @@ STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args, size_t
7271
{ MP_QSTR_buttons, MP_ARG_OBJ | MP_ARG_REQUIRED },
7372
};
7473
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
75-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args),
74+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args),
7675
allowed_args, args);
7776

7877
mp_buffer_info_t bufinfo;

shared-bindings/adafruit_bus_device/I2CDevice.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
//| """
6868
//| ...
6969
//|
70-
STATIC mp_obj_t adafruit_bus_device_i2cdevice_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
70+
STATIC mp_obj_t adafruit_bus_device_i2cdevice_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
7171
adafruit_bus_device_i2cdevice_obj_t *self = m_new_obj(adafruit_bus_device_i2cdevice_obj_t);
7272
self->base.type = &adafruit_bus_device_i2cdevice_type;
7373
enum { ARG_i2c, ARG_device_address, ARG_probe };
@@ -77,7 +77,7 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_make_new(const mp_obj_type_t *type
7777
{ MP_QSTR_probe, MP_ARG_BOOL, {.u_bool = true} },
7878
};
7979
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
80-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
80+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
8181

8282
mp_obj_t *i2c = args[ARG_i2c].u_obj;
8383

0 commit comments

Comments
 (0)