@@ -598,23 +598,8 @@ internal static void CheckExceptionOccurred()
598598[ Obsolete ( "Use NewReference or PyObject constructor instead" ) ]
599599internal static unsafe void XIncref ( BorrowedReference op )
600600{
601- #if! CUSTOM_INCDEC_REF
602601Py_IncRef ( op ) ;
603602return ;
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
618603}
619604
620605internal static unsafe void XDecref ( StolenReference op )
@@ -623,40 +608,9 @@ internal static unsafe void XDecref(StolenReference op)
623608Debug . Assert ( op == null || Refcount ( new BorrowedReference ( op . Pointer ) ) > 0 ) ;
624609Debug . Assert ( _isInitialized || Py_IsInitialized ( ) != 0 || _Py_IsFinalizing ( ) != false ) ;
625610#endif
626- #if! CUSTOM_INCDEC_REF
627611if ( op == null ) return ;
628612Py_DecRef ( op . AnalyzerWorkaround ( ) ) ;
629613return ;
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
660614}
661615
662616[ Pure ]