Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

objnamedtuple.c

Blame
    • stijn's avatar
      6b636738
      py: Fix segfault in namedtuple when name is a non-interned string · 6b636738
      stijn authored
      - namedtuple was wrongly using MP_OBJ_QSTR_VALUE instead of mp_obj_str_get_qstr,
      so when passed a non-interned string it would segfault; fix this by using mp_obj_str_get_qstr
      - store the namedtuple field names as qstrs so it is not needed to use mp_obj_str_get_qstr
      everytime the field name has to be accessed. This also slighty increases performance when
      fetching attributes
      6b636738
      History
      py: Fix segfault in namedtuple when name is a non-interned string
      stijn authored
      - namedtuple was wrongly using MP_OBJ_QSTR_VALUE instead of mp_obj_str_get_qstr,
      so when passed a non-interned string it would segfault; fix this by using mp_obj_str_get_qstr
      - store the namedtuple field names as qstrs so it is not needed to use mp_obj_str_get_qstr
      everytime the field name has to be accessed. This also slighty increases performance when
      fetching attributes