Skip to content
  • Paul Sokolovsky's avatar
    py: Cast mp_obj_t to concrete types explicitly. · 3d598256
    Paul Sokolovsky authored
    mp_obj_t internal representation doesn't have to be a pointer to object,
    it can be anything.
    There's also a support for back-conversion in the form of MP_OBJ_UNCAST.
    This is kind of optimization/status quo preserver to minimize patching the
    existing code and avoid doing potentially expensive MP_OBJ_CAST over and
    over. But then one may imagine implementations where MP_OBJ_UNCAST is very
    expensive. But such implementations are unlikely interesting in practice.