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

Commitc9ad7cd

Browse files
committed
Fix warning regarding undefined __module__ on GC Offset Base
Also makes the type names a bit more Python-esque. The `clr._internal`module doesn't exist, but that is no difference to the previous setup.
1 parent9fb7e65 commitc9ad7cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/runtime/typemanager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ internal static PyType CreateMetatypeWithGCHandleOffset()
456456
intsize=Util.ReadInt32(Runtime.PyTypeType,TypeOffset.tp_basicsize)
457457
+IntPtr.Size// tp_clr_inst_offset
458458
;
459-
varresult=newPyType(newTypeSpec("GC Offset Base",basicSize:size,
459+
varresult=newPyType(newTypeSpec("clr._internal.GCOffsetBase",basicSize:size,
460460
newTypeSpec.Slot[]
461461
{
462462

@@ -480,7 +480,7 @@ internal static PyType CreateMetaType(Type impl, out SlotsHolder slotsHolder)
480480

481481
PyTypegcOffsetBase=CreateMetatypeWithGCHandleOffset();
482482

483-
PyTypetype=AllocateTypeObject("CLRMetatype",metatype:gcOffsetBase);
483+
PyTypetype=AllocateTypeObject("Metatype",metatype:gcOffsetBase);
484484

485485
Util.WriteRef(type,TypeOffset.tp_base,newNewReference(gcOffsetBase).Steal());
486486

@@ -509,7 +509,7 @@ internal static PyType CreateMetaType(Type impl, out SlotsHolder slotsHolder)
509509
}
510510

511511
BorrowedReferencedict=Util.ReadRef(type,TypeOffset.tp_dict);
512-
using(varmod=Runtime.PyString_FromString("CLR"))
512+
using(varmod=Runtime.PyString_FromString("clr._internal"))
513513
Runtime.PyDict_SetItemString(dict,"__module__",mod.Borrow());
514514

515515
// The type has been modified after PyType_Ready has been called

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp