@@ -1243,8 +1243,8 @@ int size
12431243 [ DllImport ( PythonDll ) ]
12441244 internal static extern IntPtr PyString_FromStringAndSize ( string value , int size ) ;
12451245
1246- [ DllImport ( PythonDll , EntryPoint = " PyString_AsString " ) ]
1247- internal static extern IntPtr PyString_AS_STRING ( IntPtr op ) ;
1246+ [ DllImport ( PythonDll ) ]
1247+ internal static extern IntPtr PyString_AsString ( IntPtr op ) ;
12481248
12491249 [ DllImport( PythonDll ) ]
12501250 internal static extern int PyString_Size ( IntPtr pointer ) ;
@@ -1262,16 +1262,16 @@ internal static bool PyUnicode_Check(IntPtr ob)
12621262 [ DllImport( PythonDll ) ]
12631263 internal static extern IntPtr PyUnicode_FromEncodedObject( IntPtr ob , IntPtr enc , IntPtr err ) ;
12641264
1265- [ DllImport ( PythonDll , EntryPoint = " PyUnicode_FromKindAndData " ) ]
1266- internal static extern IntPtr PyUnicode_FromKindAndString (
1265+ [ DllImport ( PythonDll ) ]
1266+ internal static extern IntPtr PyUnicode_FromKindAndData (
12671267 int kind ,
12681268 [ MarshalAs ( UnmanagedType . CustomMarshaler , MarshalTypeRef = typeof ( StrMarshaler ) ) ] string s,
12691269 int size
12701270 ) ;
12711271
12721272 internal static IntPtr PyUnicode_FromUnicode( string s , int size )
12731273 {
1274- return PyUnicode_FromKindAndString ( UCS , s , size ) ;
1274+ return PyUnicode_FromKindAndData ( UCS , s , size ) ;
12751275 }
12761276
12771277 [ DllImport ( PythonDll ) ]
@@ -1330,7 +1330,7 @@ internal static string GetManagedString(IntPtr op)
13301330#if PYTHON2 // Python 3 strings are all Unicode
13311331 if ( type = = PyStringType )
13321332 {
1333- return Marshal . PtrToStringAnsi ( PyString_AS_STRING ( op ) , PyString_Size ( op ) ) ;
1333+ return Marshal . PtrToStringAnsi ( PyString_AsString ( op ) , PyString_Size ( op ) ) ;
13341334 }
13351335#endif
13361336
0 commit comments