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

Commitee6a828

Browse files
authored
Remove superfluous Incref
Also drop comment on the type check.If `PyCell_Set` is not called with a cell it will raise an exception, which is perfectly valid here.
1 parent82b8fdb commitee6a828

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎src/runtime/typemanager.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,7 @@ internal static IntPtr CreateSubType(IntPtr py_name, IntPtr py_base_type, IntPtr
284284
IntPtrcell=Runtime.PyDict_GetItemString(cls_dict,"__classcell__");
285285
if(cell!=IntPtr.Zero)
286286
{
287-
// if (Runtime.PyObject_TypeCheck(cell, Runtime.PyCellType))
288-
{
289-
Runtime.XIncref(cell);
290-
Runtime.PyCell_Set(cell,py_type);
291-
}
287+
Runtime.PyCell_Set(cell,py_type);
292288
Runtime.PyDict_DelItemString(cls_dict,"__classcell__");
293289
}
294290

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp