Skip to content

Commit 9c14340

Browse files
committed
remove redundant docs of struct _mp_obj_full_type_t
1 parent 52540a9 commit 9c14340

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

py/obj.h

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -636,44 +636,17 @@ struct _mp_obj_type_t {
636636
struct _mp_obj_type_ext ext[];
637637
};
638638

639+
// _mp_obj_full_type_t must match _mp_obj_type_t exactly, except that the `ext` field
640+
// is a 1-element array rather than a flexible array member.
639641
struct _mp_obj_full_type_t {
640-
// A type is an object so must start with this entry, which points to mp_type_type.
641642
mp_obj_base_t base;
642-
643-
// Flags associated with this type.
644643
uint16_t flags;
645-
646-
// The name of this type, a qstr.
647644
uint16_t name;
648-
649-
// A dict mapping qstrs to objects local methods/constants/etc.
650645
struct _mp_obj_dict_t *locals_dict;
651-
652-
// Corresponds to __new__ and __init__ special methods, to make an instance of the type.
653646
mp_make_new_fun_t make_new;
654-
655-
// Corresponds to __repr__ and __str__ special methods.
656647
mp_print_fun_t print;
657-
658-
// Implements load, store and delete attribute.
659-
//
660-
// dest[0] = MP_OBJ_NULL means load
661-
// return: for fail, do nothing
662-
// for attr, dest[0] = value
663-
// for method, dest[0] = method, dest[1] = self
664-
//
665-
// dest[0,1] = {MP_OBJ_SENTINEL, MP_OBJ_NULL} means delete
666-
// dest[0,1] = {MP_OBJ_SENTINEL, object} means store
667-
// return: for fail, do nothing
668-
// for success set dest[0] = MP_OBJ_NULL
669648
mp_attr_fun_t attr;
670-
671-
// A pointer to the parents of this type:
672-
// - 0 parents: pointer is NULL (object is implicitly the single parent)
673-
// - 1 parent: a pointer to the type of that parent
674-
// - 2 or more parents: pointer to a tuple object containing the parent types
675649
const void *parent;
676-
677650
struct _mp_obj_type_ext ext[1];
678651
};
679652

0 commit comments

Comments
 (0)