File tree 1 file changed +0
-46
lines changed
1 file changed +0
-46
lines changed Original file line number Diff line number Diff line change @@ -598,23 +598,8 @@ internal static void CheckExceptionOccurred()
598
598
[ Obsolete ( "Use NewReference or PyObject constructor instead" ) ]
599
599
internal static unsafe void XIncref ( BorrowedReference op )
600
600
{
601
- #if ! CUSTOM_INCDEC_REF
602
601
Py_IncRef ( op ) ;
603
602
return ;
604
- #else
605
- var p = ( 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
618
603
}
619
604
620
605
internal static unsafe void XDecref ( StolenReference op )
@@ -623,40 +608,9 @@ internal static unsafe void XDecref(StolenReference op)
623
608
Debug . Assert ( op == null || Refcount ( new BorrowedReference ( op . Pointer ) ) > 0 ) ;
624
609
Debug . Assert ( _isInitialized || Py_IsInitialized ( ) != 0 || _Py_IsFinalizing ( ) != false ) ;
625
610
#endif
626
- #if ! CUSTOM_INCDEC_REF
627
611
if ( op == null ) return ;
628
612
Py_DecRef ( op . AnalyzerWorkaround ( ) ) ;
629
613
return ;
630
- #else
631
- var p = ( 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 ( new IntPtr ( f ) , op ) ;
657
- }
658
- }
659
- #endif
660
614
}
661
615
662
616
[ Pure ]
You can’t perform that action at this time.
0 commit comments