Skip to content

Commit a7d091a

Browse files
committed
sq_slice and sq_ass_slice are not used in Python 3.x
1 parent 360e6a5 commit a7d091a

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

Source/PythonEngine.pas

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4860,15 +4860,6 @@ procedure TPythonEngine.Initialize;
48604860
if Assigned(gPythonEngine) then
48614861
raise Exception.Create('There is already one instance of TPythonEngine running' );
48624862

4863-
{$IFDEF FPC}
4864-
//this allows you to just call Initialize to create a non-IDE instance with
4865-
//Lazarus.
4866-
if(AutoLoad and not IsHandleValid) then begin
4867-
LoadDLL;//Calls initialize
4868-
exit;
4869-
end;
4870-
{$ENDIF}
4871-
48724863
gPythonEngine := Self;
48734864
CheckRegistry;
48744865
if IsPython3000 then begin
@@ -8945,11 +8936,11 @@ procedure TPythonType.InitServices;
89458936
sq_repeat := TPythonType_SqRepeat;
89468937
if ssItem in Services.Sequence then
89478938
sq_item := TPythonType_SqItem;
8948-
if ssSlice in Services.Sequence then
8939+
if (ssSlice in Services.Sequence) and not FEngine.IsPython3000 then
89498940
sq_slice := TPythonType_SqSlice;
89508941
if ssAssItem in Services.Sequence then
89518942
sq_ass_item := TPythonType_SqAssItem;
8952-
if ssAssSlice in Services.Sequence then
8943+
if (ssAssSlice in Services.Sequence) and not FEngine.IsPython3000 then
89538944
sq_ass_slice := TPythonType_SqAssSlice;
89548945
if ssContains in Services.Sequence then
89558946
sq_contains := TPythonType_SqContains;

0 commit comments

Comments
 (0)