@@ -678,7 +678,7 @@ internal static T TryUsingDll<T>(Func<T> op)
678
678
/// </summary>
679
679
/// <param name="ob">PyObject Ptr</param>
680
680
681
- internal static void Py_DecRef ( StolenReference ob ) => Delegates . Py_DecRef ( ob ) ;
681
+ internal static void Py_DecRef ( StolenReference ob ) => Delegates . Py_DecRef ( ob . AnalyzerWorkaround ( ) ) ;
682
682
683
683
684
684
internal static void Py_Initialize ( ) => Delegates . Py_Initialize ( ) ;
@@ -1459,7 +1459,7 @@ internal static bool PyList_Check(BorrowedReference ob)
1459
1459
1460
1460
internal static BorrowedReference PyList_GetItem ( BorrowedReference pointer , nint index ) => Delegates . PyList_GetItem ( pointer , index ) ;
1461
1461
1462
- internal static int PyList_SetItem ( BorrowedReference pointer , nint index , StolenReference value ) => Delegates . PyList_SetItem ( pointer , index , value ) ;
1462
+ internal static int PyList_SetItem ( BorrowedReference pointer , nint index , StolenReference value ) => Delegates . PyList_SetItem ( pointer , index , value . AnalyzerWorkaround ( ) ) ;
1463
1463
1464
1464
internal static int PyList_Insert ( BorrowedReference pointer , nint index , BorrowedReference value ) => Delegates . PyList_Insert ( pointer , index , value ) ;
1465
1465
@@ -1497,7 +1497,7 @@ internal static int PyTuple_SetItem(BorrowedReference pointer, nint index, Borro
1497
1497
return PyTuple_SetItem ( pointer , index , newRef . Steal ( ) ) ;
1498
1498
}
1499
1499
1500
- internal static int PyTuple_SetItem ( BorrowedReference pointer , nint index , StolenReference value ) => Delegates . PyTuple_SetItem ( pointer , index , value ) ;
1500
+ internal static int PyTuple_SetItem ( BorrowedReference pointer , nint index , StolenReference value ) => Delegates . PyTuple_SetItem ( pointer , index , value . AnalyzerWorkaround ( ) ) ;
1501
1501
1502
1502
internal static NewReference PyTuple_GetSlice ( BorrowedReference pointer , nint start , nint end ) => Delegates . PyTuple_GetSlice ( pointer , start , end ) ;
1503
1503
@@ -1657,7 +1657,7 @@ internal static bool PyType_IsSameAsOrSubtype(BorrowedReference type, BorrowedRe
1657
1657
internal static NewReference PyObject_GenericGetDict ( BorrowedReference o ) => PyObject_GenericGetDict ( o , IntPtr . Zero ) ;
1658
1658
internal static NewReference PyObject_GenericGetDict ( BorrowedReference o , IntPtr context ) => Delegates . PyObject_GenericGetDict ( o , context ) ;
1659
1659
1660
- internal static void PyObject_GC_Del ( StolenReference ob ) => Delegates . PyObject_GC_Del ( ob ) ;
1660
+ internal static void PyObject_GC_Del ( StolenReference ob ) => Delegates . PyObject_GC_Del ( ob . AnalyzerWorkaround ( ) ) ;
1661
1661
1662
1662
1663
1663
internal static bool PyObject_GC_IsTracked ( BorrowedReference ob )
@@ -1720,7 +1720,7 @@ internal static void PyErr_SetString(BorrowedReference ob, string message)
1720
1720
internal static void PyErr_Fetch ( out NewReference type , out NewReference val , out NewReference tb ) => Delegates . PyErr_Fetch ( out type , out val , out tb ) ;
1721
1721
1722
1722
1723
- internal static void PyErr_Restore ( StolenReference type , StolenReference val , StolenReference tb ) => Delegates . PyErr_Restore ( type , val , tb ) ;
1723
+ internal static void PyErr_Restore ( StolenReference type , StolenReference val , StolenReference tb ) => Delegates . PyErr_Restore ( type . AnalyzerWorkaround ( ) , val . AnalyzerWorkaround ( ) , tb . AnalyzerWorkaround ( ) ) ;
1724
1724
1725
1725
1726
1726
internal static void PyErr_Clear ( ) => Delegates . PyErr_Clear ( ) ;
@@ -1738,7 +1738,7 @@ internal static NewReference PyException_GetTraceback(BorrowedReference ex)
1738
1738
/// Set the cause associated with the exception to cause. Use NULL to clear it. There is no type check to make sure that cause is either an exception instance or None. This steals a reference to cause.
1739
1739
/// </summary>
1740
1740
internal static void PyException_SetCause ( BorrowedReference ex , StolenReference cause )
1741
- => Delegates . PyException_SetCause ( ex , cause ) ;
1741
+ => Delegates . PyException_SetCause ( ex , cause . AnalyzerWorkaround ( ) ) ;
1742
1742
internal static int PyException_SetTraceback ( BorrowedReference ex , BorrowedReference tb )
1743
1743
=> Delegates . PyException_SetTraceback ( ex , tb ) ;
1744
1744
0 commit comments