@@ -1115,13 +1115,7 @@ internal static int PyObject_Compare(IntPtr value1, IntPtr value2)
1115
1115
1116
1116
internal static int PyObject_Not ( IntPtr pointer ) => Delegates . PyObject_Not ( pointer ) ;
1117
1117
1118
- internal static long PyObject_Size ( IntPtr pointer )
1119
- {
1120
- return ( long ) _PyObject_Size ( pointer ) ;
1121
- }
1122
-
1123
-
1124
- private static IntPtr _PyObject_Size ( IntPtr pointer ) => Delegates . _PyObject_Size ( pointer ) ;
1118
+ internal static nint PyObject_Size ( BorrowedReference pointer ) => Delegates . PyObject_Size ( pointer ) ;
1125
1119
1126
1120
1127
1121
internal static nint PyObject_Hash ( IntPtr op ) => Delegates . PyObject_Hash ( op ) ;
@@ -2317,7 +2311,7 @@ static Delegates()
2317
2311
PyCallable_Check = ( delegate * unmanaged[ Cdecl] < IntPtr , int > ) GetFunctionByName ( nameof ( PyCallable_Check ) , GetUnmanagedDll ( _PythonDll ) ) ;
2318
2312
PyObject_IsTrue = ( delegate * unmanaged[ Cdecl] < BorrowedReference , int > ) GetFunctionByName ( nameof ( PyObject_IsTrue ) , GetUnmanagedDll ( _PythonDll ) ) ;
2319
2313
PyObject_Not = ( delegate * unmanaged[ Cdecl] < IntPtr , int > ) GetFunctionByName ( nameof ( PyObject_Not ) , GetUnmanagedDll ( _PythonDll ) ) ;
2320
- _PyObject_Size = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( "PyObject_Size" , GetUnmanagedDll ( _PythonDll ) ) ;
2314
+ PyObject_Size = ( delegate * unmanaged[ Cdecl] < BorrowedReference , nint > ) GetFunctionByName ( "PyObject_Size" , GetUnmanagedDll ( _PythonDll ) ) ;
2321
2315
PyObject_Hash = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyObject_Hash ) , GetUnmanagedDll ( _PythonDll ) ) ;
2322
2316
PyObject_Repr = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyObject_Repr ) , GetUnmanagedDll ( _PythonDll ) ) ;
2323
2317
PyObject_Str = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyObject_Str ) , GetUnmanagedDll ( _PythonDll ) ) ;
@@ -2589,7 +2583,7 @@ static Delegates()
2589
2583
internal static delegate * unmanaged[ Cdecl] < IntPtr , int > PyCallable_Check { get ; }
2590
2584
internal static delegate * unmanaged[ Cdecl] < BorrowedReference , int > PyObject_IsTrue { get ; }
2591
2585
internal static delegate * unmanaged[ Cdecl] < IntPtr , int > PyObject_Not { get ; }
2592
- internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > _PyObject_Size { get ; }
2586
+ internal static delegate * unmanaged[ Cdecl] < BorrowedReference , nint > PyObject_Size { get ; }
2593
2587
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyObject_Hash { get ; }
2594
2588
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyObject_Repr { get ; }
2595
2589
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyObject_Str { get ; }