@@ -3640,7 +3640,11 @@ function TPythonInterface.GetUnicodeTypeSuffix : String;
3640
3640
end ;
3641
3641
3642
3642
procedure TPythonInterface.MapDll ;
3643
+ var
3644
+ UnicodeSuffix: string;
3643
3645
begin
3646
+ UnicodeSuffix:= GetUnicodeTypeSuffix;
3647
+
3644
3648
Py_DebugFlag := Import (' Py_DebugFlag' );
3645
3649
Py_VerboseFlag := Import (' Py_VerboseFlag' );
3646
3650
Py_InteractiveFlag := Import (' Py_InteractiveFlag' );
@@ -4051,12 +4055,12 @@ procedure TPythonInterface.MapDll;
4051
4055
PyType_GenericAlloc :=Import (' PyType_GenericAlloc' );
4052
4056
PyType_GenericNew :=Import (' PyType_GenericNew' );
4053
4057
PyType_Ready :=Import (' PyType_Ready' );
4054
- PyUnicode_FromWideChar :=Import (Format(' PyUnicode%s_FromWideChar' ,[GetUnicodeTypeSuffix ]));
4055
- PyUnicode_AsWideChar :=Import (Format(' PyUnicode%s_AsWideChar' ,[GetUnicodeTypeSuffix ]));
4056
- PyUnicode_Decode :=Import (Format(' PyUnicode%s_Decode' ,[GetUnicodeTypeSuffix ]));
4057
- PyUnicode_AsEncodedString :=Import (Format(' PyUnicode%s_AsEncodedString' ,[GetUnicodeTypeSuffix ]));
4058
- PyUnicode_FromOrdinal :=Import (Format(' PyUnicode%s_FromOrdinal' ,[GetUnicodeTypeSuffix ]));
4059
- PyUnicode_GetSize :=Import (Format(' PyUnicode%s_GetSize' ,[GetUnicodeTypeSuffix ]));
4058
+ PyUnicode_FromWideChar :=Import (Format(' PyUnicode%s_FromWideChar' ,[UnicodeSuffix ]));
4059
+ PyUnicode_AsWideChar :=Import (Format(' PyUnicode%s_AsWideChar' ,[UnicodeSuffix ]));
4060
+ PyUnicode_Decode :=Import (Format(' PyUnicode%s_Decode' ,[UnicodeSuffix ]));
4061
+ PyUnicode_AsEncodedString :=Import (Format(' PyUnicode%s_AsEncodedString' ,[UnicodeSuffix ]));
4062
+ PyUnicode_FromOrdinal :=Import (Format(' PyUnicode%s_FromOrdinal' ,[UnicodeSuffix ]));
4063
+ PyUnicode_GetSize :=Import (Format(' PyUnicode%s_GetSize' ,[UnicodeSuffix ]));
4060
4064
PyWeakref_GetObject :=Import (' PyWeakref_GetObject' );
4061
4065
PyWeakref_NewProxy :=Import (' PyWeakref_NewProxy' );
4062
4066
PyWeakref_NewRef :=Import (' PyWeakref_NewRef' );
0 commit comments