fix (unused) default for some required args
This commit is contained in:
parent
085cf0e3e4
commit
e1af819a91
|
@ -72,7 +72,7 @@
|
||||||
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) {
|
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) {
|
||||||
enum { ARG_buffer, ARG_channel_count, ARG_sample_rate };
|
enum { ARG_buffer, ARG_channel_count, ARG_sample_rate };
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED },
|
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = MP_OBJ_NULL } },
|
||||||
{ MP_QSTR_channel_count, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1 } },
|
{ MP_QSTR_channel_count, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1 } },
|
||||||
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 8000} },
|
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 8000} },
|
||||||
};
|
};
|
||||||
|
|
|
@ -201,7 +201,7 @@ MP_PROPERTY_GETTER(audiomixer_mixer_voice_obj,
|
||||||
STATIC mp_obj_t audiomixer_mixer_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
STATIC mp_obj_t audiomixer_mixer_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||||
enum { ARG_sample, ARG_voice, ARG_loop };
|
enum { ARG_sample, ARG_voice, ARG_loop };
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{ MP_QSTR_sample, MP_ARG_OBJ | MP_ARG_REQUIRED },
|
{ MP_QSTR_sample, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
|
||||||
{ MP_QSTR_voice, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
|
{ MP_QSTR_voice, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
|
||||||
{ MP_QSTR_loop, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
|
{ MP_QSTR_loop, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
|
||||||
};
|
};
|
||||||
|
|
|
@ -64,7 +64,7 @@ STATIC mp_obj_t audiomixer_mixervoice_make_new(const mp_obj_type_t *type, size_t
|
||||||
STATIC mp_obj_t audiomixer_mixervoice_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
STATIC mp_obj_t audiomixer_mixervoice_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||||
enum { ARG_sample, ARG_loop };
|
enum { ARG_sample, ARG_loop };
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{ MP_QSTR_sample, MP_ARG_OBJ | MP_ARG_REQUIRED },
|
{ MP_QSTR_sample, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
|
||||||
{ MP_QSTR_loop, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
|
{ MP_QSTR_loop, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
|
||||||
};
|
};
|
||||||
audiomixer_mixervoice_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
|
audiomixer_mixervoice_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
|
||||||
|
@ -105,7 +105,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixervoice_get_level_obj, audiomixer_mixerv
|
||||||
STATIC mp_obj_t audiomixer_mixervoice_obj_set_level(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
STATIC mp_obj_t audiomixer_mixervoice_obj_set_level(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||||
enum { ARG_level };
|
enum { ARG_level };
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{ MP_QSTR_level, MP_ARG_OBJ | MP_ARG_REQUIRED },
|
{ MP_QSTR_level, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
|
||||||
};
|
};
|
||||||
audiomixer_mixervoice_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
|
audiomixer_mixervoice_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
|
||||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||||
|
|
|
@ -970,11 +970,11 @@ STATIC mp_obj_t bitmaptools_obj_draw_circle(size_t n_args, const mp_obj_t *pos_a
|
||||||
enum {ARG_dest_bitmap, ARG_x, ARG_y, ARG_radius, ARG_value};
|
enum {ARG_dest_bitmap, ARG_x, ARG_y, ARG_radius, ARG_value};
|
||||||
|
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ},
|
{MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ, {}},
|
||||||
{MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT},
|
{MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT, {}},
|
||||||
{MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT},
|
{MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT, {}},
|
||||||
{MP_QSTR_radius, MP_ARG_REQUIRED | MP_ARG_INT},
|
{MP_QSTR_radius, MP_ARG_REQUIRED | MP_ARG_INT, {}},
|
||||||
{MP_QSTR_value, MP_ARG_REQUIRED | MP_ARG_INT},
|
{MP_QSTR_value, MP_ARG_REQUIRED | MP_ARG_INT, {}},
|
||||||
};
|
};
|
||||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||||
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
||||||
|
|
|
@ -132,8 +132,8 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_obj, 2, 3, struct_unpack);
|
||||||
STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||||
enum { ARG_format, ARG_buffer, ARG_offset };
|
enum { ARG_format, ARG_buffer, ARG_offset };
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{ MP_QSTR_format, MP_ARG_REQUIRED | MP_ARG_OBJ },
|
{ MP_QSTR_format, MP_ARG_REQUIRED | MP_ARG_OBJ, {} },
|
||||||
{ MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ },
|
{ MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ, {} },
|
||||||
{ MP_QSTR_offset, MP_ARG_INT, {.u_int = 0} },
|
{ MP_QSTR_offset, MP_ARG_INT, {.u_int = 0} },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@
|
||||||
STATIC mp_obj_t synthio_miditrack_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
|
STATIC mp_obj_t synthio_miditrack_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
|
||||||
enum { ARG_buffer, ARG_tempo, ARG_sample_rate, ARG_waveform, ARG_envelope };
|
enum { ARG_buffer, ARG_tempo, ARG_sample_rate, ARG_waveform, ARG_envelope };
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED },
|
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
|
||||||
{ MP_QSTR_tempo, MP_ARG_INT | MP_ARG_REQUIRED },
|
{ MP_QSTR_tempo, MP_ARG_INT | MP_ARG_REQUIRED, {} },
|
||||||
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} },
|
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} },
|
||||||
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
||||||
{ MP_QSTR_envelope, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
{ MP_QSTR_envelope, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
||||||
|
|
|
@ -233,7 +233,7 @@ const mp_obj_namedtuple_type_t synthio_envelope_type_obj = {
|
||||||
STATIC mp_obj_t synthio_from_file(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
STATIC mp_obj_t synthio_from_file(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||||
enum { ARG_file, ARG_sample_rate, ARG_waveform, ARG_envelope };
|
enum { ARG_file, ARG_sample_rate, ARG_waveform, ARG_envelope };
|
||||||
static const mp_arg_t allowed_args[] = {
|
static const mp_arg_t allowed_args[] = {
|
||||||
{ MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED },
|
{ MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
|
||||||
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} },
|
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} },
|
||||||
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
||||||
{ MP_QSTR_envelope, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
{ MP_QSTR_envelope, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
|
||||||
|
|
Loading…
Reference in New Issue