Skip to content

mp_const_none and friends are lvalue variables #388

@pfalcon

Description

@pfalcon

As I suspected, mp_const_none and friends are not constant expressions, but variables with const modifier. Besides being non-efficient, it's also make impossible to do stuff like:

static mp_obj_t arr[] = {mp_const_none};

Instead of current impl, we should define them as:

#define mp_const_none (mp_obj_t)&mp_const_none_obj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions