Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CopySlot
1 parent abbe870 commit d1044c3Copy full SHA for d1044c3
src/runtime/typemanager.cs
@@ -309,17 +309,11 @@ internal static IntPtr CreateMetaType(Type impl)
309
Marshal.WriteIntPtr(type, TypeOffset.tp_base, py_type);
310
Runtime.XIncref(py_type);
311
312
- // Copy gc and other type slots from the base Python metatype.
313
-
314
- CopySlot(py_type, type, TypeOffset.tp_basicsize);
315
- CopySlot(py_type, type, TypeOffset.tp_itemsize);
316
317
- CopySlot(py_type, type, TypeOffset.tp_dictoffset);
318
- CopySlot(py_type, type, TypeOffset.tp_weaklistoffset);
319
320
- CopySlot(py_type, type, TypeOffset.tp_traverse);
321
- CopySlot(py_type, type, TypeOffset.tp_clear);
322
- CopySlot(py_type, type, TypeOffset.tp_is_gc);
+ // Slots will inherit from TypeType, it's not neccesary for setting them.
+ // Inheried slots:
+ // tp_basicsize, tp_itemsize,
+ // tp_dictoffset, tp_weaklistoffset,
+ // tp_traverse, tp_clear, tp_is_gc, etc.
323
324
// Override type slots with those of the managed implementation.
325
0 commit comments