MCPcopy Index your code
hub / github.com/RustPython/RustPython / inherit_slots

Method inherit_slots

crates/vm/src/builtins/type.rs:867–873  ·  view source on GitHub ↗

Inherit slots from base type. inherit_slots

(&self, base: &Self)

Source from the content-addressed store, hash-verified

865
866 /// Inherit slots from base type. inherit_slots
867 pub(crate) fn inherit_slots(&self, base: &Self) {
868 // Use SLOT_DEFS to iterate all slots
869 // Note: as_buffer is handled in inherit_readonly_slots (not AtomicCell)
870 for def in SLOT_DEFS {
871 def.accessor.copyslot_if_none(self, base);
872 }
873 }
874
875 // This is used for class initialization where the vm is not yet available.
876 pub fn set_str_attr<V: Into<PyObjectRef>>(

Callers 2

extend_classMethod · 0.80
init_slotsMethod · 0.80

Calls 1

copyslot_if_noneMethod · 0.80

Tested by

no test coverage detected