@@ -2034,23 +2034,32 @@ internal static IntPtr PyMem_Realloc(IntPtr ptr, long size)
2034
2034
internal static extern int PyErr_GivenExceptionMatches( IntPtr ob, IntPtr val) ;
2035
2035
2036
2036
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2037
- internal static extern void PyErr_NormalizeException( IntPtr ob, IntPtr val, IntPtr tb) ;
2037
+ internal static extern void PyErr_NormalizeException( ref NewReference ob, ref NewReference val, ref NewReference tb) ;
2038
2038
2039
2039
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2040
2040
internal static extern IntPtr PyErr_Occurred( ) ;
2041
2041
2042
2042
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2043
2043
internal static extern void PyErr_Fetch( out IntPtr ob, out IntPtr val, out IntPtr tb) ;
2044
+ [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2045
+ internal static extern void PyErr_Fetch( out NewReference ob, out NewReference val, out NewReference tb) ;
2044
2046
2045
2047
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2046
2048
internal static extern void PyErr_Restore( IntPtr ob, IntPtr val, IntPtr tb) ;
2049
+ [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2050
+ internal static extern void PyErr_Restore( StolenReference ob, StolenReference val, StolenReference tb) ;
2047
2051
2048
2052
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2049
2053
internal static extern void PyErr_Clear( ) ;
2050
2054
2051
2055
[ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2052
2056
internal static extern void PyErr_Print( ) ;
2053
2057
2058
+ [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2059
+ internal static extern void PyException_SetCause( BorrowedReference ex, StolenReference cause) ;
2060
+ [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
2061
+ internal static extern int PyException_SetTraceback( BorrowedReference ex, BorrowedReference cause) ;
2062
+
2054
2063
//====================================================================
2055
2064
// Cell API
2056
2065
//====================================================================
0 commit comments