Skip to content

Commit 00bcad6

Browse files
committed
micro optim
1 parent 303fe24 commit 00bcad6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

python4lazarus/Sources/Core/PythonEngine.pas

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3640,7 +3640,11 @@ function TPythonInterface.GetUnicodeTypeSuffix : String;
36403640
end;
36413641

36423642
procedure TPythonInterface.MapDll;
3643+
var
3644+
UnicodeSuffix: string;
36433645
begin
3646+
UnicodeSuffix:= GetUnicodeTypeSuffix;
3647+
36443648
Py_DebugFlag := Import('Py_DebugFlag');
36453649
Py_VerboseFlag := Import('Py_VerboseFlag');
36463650
Py_InteractiveFlag := Import('Py_InteractiveFlag');
@@ -4051,12 +4055,12 @@ procedure TPythonInterface.MapDll;
40514055
PyType_GenericAlloc :=Import('PyType_GenericAlloc');
40524056
PyType_GenericNew :=Import('PyType_GenericNew');
40534057
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]));
40604064
PyWeakref_GetObject :=Import('PyWeakref_GetObject');
40614065
PyWeakref_NewProxy :=Import('PyWeakref_NewProxy');
40624066
PyWeakref_NewRef :=Import('PyWeakref_NewRef');

0 commit comments

Comments
 (0)