Skip to content

Commit 79a7ac8

Browse files
committed
Make the last commit FPC compatible. (Use PosEx instead of Pos).
1 parent bf3357e commit 79a7ac8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

PythonForDelphi/Components/Sources/Core/PythonEngine.pas

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3196,8 +3196,15 @@ procedure MaskFPUExceptions(ExceptionsMasked : boolean;
31963196

31973197
implementation
31983198

3199+
uses
3200+
{$IFDEF FPC}
3201+
StrUtils,
3202+
{$ELSE}
3203+
AnsiStrings,
3204+
{$ENDIF}
31993205
{$IFDEF MSWINDOWS}
3200-
uses Math, Registry;
3206+
Math,
3207+
Registry;
32013208
{$ENDIF}
32023209

32033210

@@ -5235,7 +5242,7 @@ function TPythonEngine.CleanString(const s : AnsiString; AppendLF : Boolean) : A
52355242
while i > 0 do
52365243
begin
52375244
Delete( result, i, 1 );
5238-
i := Pos(AnsiString(CR),result, i);
5245+
i := PosEx(AnsiString(CR),result, i);
52395246
end;
52405247
if AppendLF and (result[length(result)] <> LF) then
52415248
Insert( LF, result, length(result)+1 );

0 commit comments

Comments
 (0)