@@ -1771,13 +1771,14 @@ TPythonInterface=class(TDynamicDll)
1771
1771
PyDict_GetItemString: function( dp: PPyObject; key: PAnsiChar): PPyObject; cdecl;
1772
1772
PyDict_SetItemString: function( dp: PPyObject; key: PAnsiChar; item: PPyObject):
1773
1773
Integer; cdecl;
1774
- PyDictProxy_New: function (obj : PPyObject) : PPyObject; cdecl;
1774
+ PyDictProxy_New: function (obj : PPyObject) : PPyObject; cdecl;
1775
1775
PyModule_GetDict: function( module :PPyObject): PPyObject; cdecl;
1776
1776
PyObject_Str: function( v: PPyObject): PPyObject; cdecl;
1777
1777
PyRun_String: function( str: PAnsiChar; start: Integer; globals: PPyObject;
1778
1778
locals: PPyObject): PPyObject; cdecl;
1779
1779
PyRun_SimpleString: function( str: PAnsiChar): Integer; cdecl;
1780
1780
PyString_AsString: function( ob: PPyObject): PAnsiChar; cdecl;
1781
+ PyString_AsStringAndSize: function( ob: PPyObject; var buffer: PAnsiChar; var size: NativeInt): integer; cdecl;
1781
1782
PySys_SetArgv: procedure( argc: Integer; argv: PPAnsiChar); cdecl;
1782
1783
PySys_SetArgv3000: procedure( argc: Integer; argv: PPWideChar); cdecl;
1783
1784
@@ -3836,10 +3837,13 @@ procedure TPythonInterface.MapDll;
3836
3837
PyRun_String := Import (' PyRun_String' );
3837
3838
PyRun_SimpleString := Import (' PyRun_SimpleString' );
3838
3839
PyDict_GetItemString := Import (' PyDict_GetItemString' );
3839
- if not IsPython3000 then
3840
- PyString_AsString := Import (' PyString_AsString' )
3841
- else
3840
+ if not IsPython3000 then begin
3841
+ PyString_AsString := Import (' PyString_AsString' );
3842
+ PyString_AsStringAndSize := Import (' PyString_AsStringAndSize' )
3843
+ end else begin
3842
3844
PyString_AsString := Import (' PyBytes_AsString' );
3845
+ PyString_AsStringAndSize := Import (' PyBytes_AsStringAndSize' );
3846
+ end ;
3843
3847
if not IsPython3000 then
3844
3848
DLL_PyString_FromString := Import (' PyString_FromString' );
3845
3849
if not IsPython3000 then
0 commit comments