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

Commit93d4119

Browse files
committed
Drop unused custom incref/decref
1 parent6aa92c1 commit93d4119

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

‎src/runtime/Runtime.cs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -598,23 +598,8 @@ internal static void CheckExceptionOccurred()
598598
[Obsolete("Use NewReference or PyObject constructor instead")]
599599
internalstaticunsafevoidXIncref(BorrowedReferenceop)
600600
{
601-
#if!CUSTOM_INCDEC_REF
602601
Py_IncRef(op);
603602
return;
604-
#else
605-
varp=(void*)op;
606-
if((void*)0!=p)
607-
{
608-
if(Is32Bit)
609-
{
610-
(*(int*)p)++;
611-
}
612-
else
613-
{
614-
(*(long*)p)++;
615-
}
616-
}
617-
#endif
618603
}
619604

620605
internalstaticunsafevoidXDecref(StolenReferenceop)
@@ -623,40 +608,9 @@ internal static unsafe void XDecref(StolenReference op)
623608
Debug.Assert(op==null||Refcount(newBorrowedReference(op.Pointer))>0);
624609
Debug.Assert(_isInitialized||Py_IsInitialized()!=0||_Py_IsFinalizing()!=false);
625610
#endif
626-
#if!CUSTOM_INCDEC_REF
627611
if(op==null)return;
628612
Py_DecRef(op.AnalyzerWorkaround());
629613
return;
630-
#else
631-
varp=(void*)op;
632-
if((void*)0!=p)
633-
{
634-
if(Is32Bit)
635-
{
636-
--(*(int*)p);
637-
}
638-
else
639-
{
640-
--(*(long*)p);
641-
}
642-
if((*(int*)p)==0)
643-
{
644-
// PyObject_HEAD: struct _typeobject *ob_type
645-
void* t= Is32Bit
646-
?(void*)(*((uint*)p+1))
647-
:(void*)(*((ulong*)p+1));
648-
// PyTypeObject: destructor tp_dealloc
649-
void*f= Is32Bit
650-
?(void*)(*((uint*)t+6))
651-
:(void*)(*((ulong*)t+6));
652-
if((void*)0==f)
653-
{
654-
return;
655-
}
656-
NativeCall.Void_Call_1(newIntPtr(f),op);
657-
}
658-
}
659-
#endif
660614
}
661615

662616
[Pure]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp