@@ -1529,10 +1529,10 @@ internal static IntPtr PyString_FromString(string value)
15291529 fixed( char * ptr = value )
15301530 return Delegates . PyUnicode_DecodeUTF16 (
15311531 ( IntPtr ) ptr ,
1532- new IntPtr ( value . Length * sizeof ( Char ) ) ,
1532+ value . Length * sizeof ( Char ) ,
15331533 IntPtr . Zero ,
15341534 IntPtr . Zero
1535- ) . DangerousGetAddress ( ) ;
1535+ ) . DangerousMoveToPointerOrNull ( ) ;
15361536 }
15371537
15381538
@@ -2418,7 +2418,7 @@ static Delegates()
24182418 _PyBytes_Size = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( "PyBytes_Size" , GetUnmanagedDll ( _PythonDll ) ) ;
24192419 PyUnicode_AsUTF8 = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyUnicode_AsUTF8 ) , GetUnmanagedDll ( _PythonDll ) ) ;
24202420 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 ) ) ;
24222422 PyUnicode_FromEncodedObject = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr , IntPtr , IntPtr > ) GetFunctionByName ( nameof ( PyUnicode_FromEncodedObject ) , GetUnmanagedDll ( _PythonDll ) ) ;
24232423 PyUnicode_GetMax = ( delegate * unmanaged[ Cdecl] < int > ) GetFunctionByName ( nameof ( PyUnicode_GetMax ) , GetUnmanagedDll ( _PythonDll ) ) ;
24242424 _PyUnicode_GetSize = ( delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > ) GetFunctionByName ( "PyUnicode_GetSize" , GetUnmanagedDll ( _PythonDll ) ) ;
@@ -2714,7 +2714,7 @@ static Delegates()
27142714 internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyUnicode_AsUTF8 { get ; }
27152715 internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyUnicode_FromObject { get ; }
27162716 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 ; }
27182718 internal static delegate * unmanaged[ Cdecl] < int > PyUnicode_GetMax { get ; }
27192719 internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > _PyUnicode_GetSize { get ; }
27202720 internal static delegate * unmanaged[ Cdecl] < IntPtr , IntPtr > PyUnicode_AsUnicode { get ; }
0 commit comments