Skip to content

Commit bb84752

Browse files
committed
codeop: simplify slightly now that there's no problem with <input> qstr
1 parent 4072274 commit bb84752

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

shared-bindings/codeop/__init__.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,12 @@ STATIC mp_obj_t compile_command(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m
4949
enum { ARG_source, ARG_filename, ARG_symbol };
5050
static const mp_arg_t allowed_args[] = {
5151
{ MP_QSTR_source, MP_ARG_REQUIRED | MP_ARG_OBJ, { .u_obj = mp_const_none } },
52-
{ MP_QSTR_filename, MP_ARG_OBJ, { .u_obj = MP_OBJ_NULL } },
52+
{ MP_QSTR_filename, MP_ARG_OBJ, { .u_obj = MP_ROM_QSTR(MP_QSTR__lt_input_gt_) } },
5353
{ MP_QSTR_symbol, MP_ARG_OBJ, { .u_obj = MP_ROM_QSTR(MP_QSTR_single) } },
5454
};
5555
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
5656
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
5757

58-
if (args[ARG_filename].u_obj == MP_OBJ_NULL) {
59-
args[ARG_filename].u_obj = mp_obj_new_str_via_qstr("<input>", 7);
60-
}
6158
const char *source = get_arg_str(args[ARG_source].u_obj, MP_QSTR_source);
6259
if (mp_repl_continue_with_input(source)) {
6360
return mp_const_none;

0 commit comments

Comments
 (0)