Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd1044c3

Browse files
amos402filmor
authored andcommitted
Remove unnecessaryCopySlot calls (#1004)
1 parentabbe870 commitd1044c3

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

‎src/runtime/typemanager.cs‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,11 @@ internal static IntPtr CreateMetaType(Type impl)
309309
Marshal.WriteIntPtr(type,TypeOffset.tp_base,py_type);
310310
Runtime.XIncref(py_type);
311311

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);
312+
// Slots will inherit from TypeType, it's not neccesary for setting them.
313+
// Inheried slots:
314+
// tp_basicsize, tp_itemsize,
315+
// tp_dictoffset, tp_weaklistoffset,
316+
// tp_traverse, tp_clear, tp_is_gc, etc.
323317

324318
// Override type slots with those of the managed implementation.
325319

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp