Content-Length: 1412167 | pFad | http://github.com/adafruit/circuitpython/commit/4e7c1a4bd45c550007be13a9448e30e03b28962f

C6 Rename make_new's parameter to `all_args` · adafruit/circuitpython@4e7c1a4 · GitHub
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

Diff for: extmod/vfs_lfsx.c

+2-2
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;

Diff for: ports/raspberrypi/bindings/rp2pio/StateMachine.c

+2-2
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);

Diff for: shared-bindings/_bleio/Adapter.c

+2-2
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)) {

Diff for: shared-bindings/_bleio/Address.c

+2-2
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;

Diff for: shared-bindings/_bleio/CharacteristicBuffer.c

+2-2
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

Diff for: shared-bindings/_bleio/PacketBuffer.c

+2-2
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

Diff for: shared-bindings/_bleio/Service.c

+2-2
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)) {

Diff for: shared-bindings/_bleio/UUID.c

+2-2
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)) {

Diff for: shared-bindings/_pew/PewPew.c

+2-3
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;

Diff for: shared-bindings/adafruit_bus_device/I2CDevice.c

+2-2
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

Diff for: shared-bindings/adafruit_bus_device/SPIDevice.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
//| spi.write(bytes_read)"""
7272
//| ...
7373
//|
74-
STATIC mp_obj_t adafruit_bus_device_spidevice_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
74+
STATIC mp_obj_t adafruit_bus_device_spidevice_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
7575
adafruit_bus_device_spidevice_obj_t *self = m_new_obj(adafruit_bus_device_spidevice_obj_t);
7676
self->base.type = &adafruit_bus_device_spidevice_type;
7777
enum { ARG_spi, ARG_chip_select, ARG_cs_active_value, ARG_baudrate, ARG_polarity, ARG_phase, ARG_extra_clocks };
@@ -85,7 +85,7 @@ STATIC mp_obj_t adafruit_bus_device_spidevice_make_new(const mp_obj_type_t *type
8585
{ MP_QSTR_extra_clocks, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
8686
};
8787
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
88-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
88+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
8989

9090
busio_spi_obj_t *spi = args[ARG_spi].u_obj;
9191

Diff for: shared-bindings/adafruit_pixelbuf/PixelBuf.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void parse_byteorder(mp_obj_t byteorder_obj, pixelbuf_byteorder_details_t
6868
//| :param ~_typing.ReadableBuffer trailer: Sequence of bytes to always send after pixel values."""
6969
//| ...
7070
//|
71-
STATIC mp_obj_t pixelbuf_pixelbuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
71+
STATIC mp_obj_t pixelbuf_pixelbuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
7272
enum { ARG_size, ARG_byteorder, ARG_brightness, ARG_auto_write, ARG_header, ARG_trailer };
7373
static const mp_arg_t allowed_args[] = {
7474
{ MP_QSTR_size, MP_ARG_REQUIRED | MP_ARG_INT },
@@ -79,7 +79,7 @@ STATIC mp_obj_t pixelbuf_pixelbuf_make_new(const mp_obj_type_t *type, size_t n_a
7979
{ MP_QSTR_trailer, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = mp_const_none } },
8080
};
8181
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
82-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
82+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
8383
pixelbuf_byteorder_details_t byteorder_details;
8484

8585
parse_byteorder(args[ARG_byteorder].u_obj, &byteorder_details);

Diff for: shared-bindings/aesio/aes.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//|
3838

3939
STATIC mp_obj_t aesio_aes_make_new(const mp_obj_type_t *type, size_t n_args,
40-
size_t n_kw, const mp_obj_t *pos_args) {
40+
size_t n_kw, const mp_obj_t *all_args) {
4141
(void)type;
4242
enum { ARG_key, ARG_mode, ARG_IV, ARG_counter, ARG_segment_size };
4343
static const mp_arg_t allowed_args[] = {
@@ -49,7 +49,7 @@ STATIC mp_obj_t aesio_aes_make_new(const mp_obj_type_t *type, size_t n_args,
4949
};
5050
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
5151

52-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args),
52+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args),
5353
allowed_args, args);
5454

5555
aesio_aes_obj_t *self = m_new_obj(aesio_aes_obj_t);

Diff for: shared-bindings/alarm/pin/PinAlarm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
//| """
6161
//| ...
6262
//|
63-
STATIC mp_obj_t alarm_pin_pinalarm_make_new(const mp_obj_type_t *type, mp_uint_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
63+
STATIC mp_obj_t alarm_pin_pinalarm_make_new(const mp_obj_type_t *type, mp_uint_t n_args, size_t n_kw, const mp_obj_t *all_args) {
6464
alarm_pin_pinalarm_obj_t *self = m_new_obj(alarm_pin_pinalarm_obj_t);
6565
self->base.type = &alarm_pin_pinalarm_type;
6666
enum { ARG_pin, ARG_value, ARG_edge, ARG_pull };
@@ -71,7 +71,7 @@ STATIC mp_obj_t alarm_pin_pinalarm_make_new(const mp_obj_type_t *type, mp_uint_t
7171
{ MP_QSTR_pull, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
7272
};
7373
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
74-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
74+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
7575

7676
const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj);
7777

Diff for: shared-bindings/alarm/time/TimeAlarm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ mp_obj_t MP_WEAK rtc_get_time_source_time(void) {
5757
//| ...
5858
//|
5959
STATIC mp_obj_t alarm_time_timealarm_make_new(const mp_obj_type_t *type,
60-
size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
60+
size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
6161
alarm_time_timealarm_obj_t *self = m_new_obj(alarm_time_timealarm_obj_t);
6262
self->base.type = &alarm_time_timealarm_type;
6363

@@ -68,7 +68,7 @@ STATIC mp_obj_t alarm_time_timealarm_make_new(const mp_obj_type_t *type,
6868
};
6969

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

7373
bool have_monotonic = args[ARG_monotonic_time].u_obj != mp_const_none;
7474
bool have_epoch = args[ARG_epoch_time].u_obj != mp_const_none;

Diff for: shared-bindings/alarm/touch/TouchAlarm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
//| ...
4444
//|
4545
STATIC mp_obj_t alarm_touch_touchalarm_make_new(const mp_obj_type_t *type,
46-
size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
46+
size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
4747
alarm_touch_touchalarm_obj_t *self = m_new_obj(alarm_touch_touchalarm_obj_t);
4848
self->base.type = &alarm_touch_touchalarm_type;
4949

@@ -53,7 +53,7 @@ STATIC mp_obj_t alarm_touch_touchalarm_make_new(const mp_obj_type_t *type,
5353
};
5454

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

5858
const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj);
5959

Diff for: shared-bindings/audiobusio/I2SOut.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
//| print("stopped")"""
9191
//| ...
9292
//|
93-
STATIC mp_obj_t audiobusio_i2sout_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
93+
STATIC mp_obj_t audiobusio_i2sout_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
9494
#if !CIRCUITPY_AUDIOBUSIO_I2SOUT
9595
mp_raise_NotImplementedError(translate("I2SOut not available"));
9696
return NULL; // Not reachable.
@@ -103,7 +103,7 @@ STATIC mp_obj_t audiobusio_i2sout_make_new(const mp_obj_type_t *type, size_t n_a
103103
{ MP_QSTR_left_justified, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_bool = false} },
104104
};
105105
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
106-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
106+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
107107

108108
const mcu_pin_obj_t *bit_clock = validate_obj_is_free_pin(args[ARG_bit_clock].u_obj);
109109
const mcu_pin_obj_t *word_select = validate_obj_is_free_pin(args[ARG_word_select].u_obj);

Diff for: shared-bindings/audiobusio/PDMIn.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
//| mic.record(b, len(b))"""
8484
//| ...
8585
//|
86-
STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
86+
STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
8787
#if !CIRCUITPY_AUDIOBUSIO_PDMIN
8888
mp_raise_NotImplementedError(translate("PDMIn not available"));
8989
#else
@@ -101,7 +101,7 @@ STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_ar
101101
static const float STARTUP_DELAY_DEFAULT = 0.110F;
102102

103103
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
104-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
104+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
105105

106106
const mcu_pin_obj_t *clock_pin = validate_obj_is_free_pin(args[ARG_clock_pin].u_obj);
107107
const mcu_pin_obj_t *data_pin = validate_obj_is_free_pin(args[ARG_data_pin].u_obj);

Diff for: shared-bindings/audiocore/RawSample.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@
6969
//| dac.stop()"""
7070
//| ...
7171
//|
72-
STATIC mp_obj_t audioio_rawsample_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
72+
STATIC mp_obj_t audioio_rawsample_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
7373
enum { ARG_buffer, ARG_channel_count, ARG_sample_rate };
7474
static const mp_arg_t allowed_args[] = {
7575
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED },
7676
{ MP_QSTR_channel_count, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1 } },
7777
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 8000} },
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
audioio_rawsample_obj_t *self = m_new_obj(audioio_rawsample_obj_t);
8383
self->base.type = &audioio_rawsample_type;

Diff for: shared-bindings/audioio/AudioOut.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@
9090
//| print("stopped")"""
9191
//| ...
9292
//|
93-
STATIC mp_obj_t audioio_audioout_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
93+
STATIC mp_obj_t audioio_audioout_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
9494
enum { ARG_left_channel, ARG_right_channel, ARG_quiescent_value };
9595
static const mp_arg_t allowed_args[] = {
9696
{ MP_QSTR_left_channel, MP_ARG_OBJ | MP_ARG_REQUIRED },
9797
{ MP_QSTR_right_channel, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_rom_obj = mp_const_none} },
9898
{ MP_QSTR_quiescent_value, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x8000} },
9999
};
100100
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
101-
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
101+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
102102

103103
const mcu_pin_obj_t *left_channel_pin = validate_obj_is_free_pin(args[ARG_left_channel].u_obj);
104104
const mcu_pin_obj_t *right_channel_pin = validate_obj_is_free_pin_or_none(args[ARG_right_channel].u_obj);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/adafruit/circuitpython/commit/4e7c1a4bd45c550007be13a9448e30e03b28962f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy