@@ -1529,10 +1529,10 @@ internal static IntPtr PyString_FromString(string value)
1529
1529
fixed( char * ptr = value )
1530
1530
return Delegates . PyUnicode_DecodeUTF16 (
1531
1531
( IntPtr ) ptr ,
1532
- new IntPtr ( value . Length * sizeof ( Char ) ) ,
1532
+ value . Length * sizeof ( Char ) ,
1533
1533
IntPtr . Zero ,
1534
1534
IntPtr . Zero
1535
- ) . DangerousGetAddress ( ) ;
1535
+ ) . DangerousMoveToPointerOrNull ( ) ;
1536
1536
}
1537
1537
1538
1538
@@ -2418,7 +2418,7 @@ static Delegates()
2418
2418
_PyBytes_Size = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( "PyBytes_Size" , GetUnmanagedDll ( _PythonDll ) ) ;
2419
2419
PyUnicode_AsUTF8 = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyUnicode_AsUTF8 ) , GetUnmanagedDll ( _PythonDll ) ) ;
2420
2420
PyUnicode_FromObject = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyUnicode_FromObject ) , GetUnmanagedDll ( _PythonDll ) ) ;
2421
- PyUnicode_DecodeUTF16 = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr , IntPtr , IntPtr , NewReference > ) GetFunctionByName ( nameof ( PyUnicode_DecodeUTF16 ) , GetUnmanagedDll ( _PythonDll ) ) ;
2421
+ PyUnicode_DecodeUTF16 = ( delegate * unmanaged[ Cdecl] < IntPtr , nint , IntPtr , IntPtr , NewReference > ) GetFunctionByName ( nameof ( PyUnicode_DecodeUTF16 ) , GetUnmanagedDll ( _PythonDll ) ) ;
2422
2422
PyUnicode_FromEncodedObject = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr , IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyUnicode_FromEncodedObject ) , GetUnmanagedDll ( _PythonDll ) ) ;
2423
2423
PyUnicode_GetMax = ( delegate * unmanaged[ Cdecl] < int > ) GetFunctionByName ( nameof ( PyUnicode_GetMax ) , GetUnmanagedDll ( _PythonDll ) ) ;
2424
2424
_PyUnicode_GetSize = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( "PyUnicode_GetSize" , GetUnmanagedDll ( _PythonDll ) ) ;
@@ -2714,7 +2714,7 @@ static Delegates()
2714
2714
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyUnicode_AsUTF8 { get ; }
2715
2715
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyUnicode_FromObject { get ; }
2716
2716
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr , IntPtr , IntPtr > PyUnicode_FromEncodedObject { get ; }
2717
- internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr , IntPtr , IntPtr , NewReference > PyUnicode_DecodeUTF16 { get ; }
2717
+ internal static delegate * unmanaged[ Cdecl] < IntPtr , nint , IntPtr , IntPtr , NewReference > PyUnicode_DecodeUTF16 { get ; }
2718
2718
internal static delegate * unmanaged[ Cdecl] < int > PyUnicode_GetMax { get ; }
2719
2719
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > _PyUnicode_GetSize { get ; }
2720
2720
internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyUnicode_AsUnicode { get ; }
0 commit comments