From b8de7220386b8aba68beadc346121afbd33048aa Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 23 Jun 2026 18:32:37 +0100 Subject: [PATCH] stdlib: TProcess.Parameters is TList, not TStringList MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Process arguments are only ever appended and iterated (Add/Get/Count) — none of the TStringList-specific API is used by any consumer, so TList is behaviour-identical and expresses 'an ordered list of argument strings' more honestly. Every call site uses Parameters.Add(...), unchanged. Lets the unit drop its Classes dependency for Generics.Collections. All consumers (the codegen/linker driver, the test runner, the compiler test harnesses) compile and pass unchanged: 3743 compiler + 47 stdlib tests. --- stdlib/src/main/pascal/process.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/src/main/pascal/process.pas b/stdlib/src/main/pascal/process.pas index 06cea1e..1373878 100644 --- a/stdlib/src/main/pascal/process.pas +++ b/stdlib/src/main/pascal/process.pas @@ -32,13 +32,13 @@ unit Process; interface -uses Classes; +uses Generics.Collections; type TProcess = class FHandle: Pointer; FExe: string; - FParameters: TStringList; + FParameters: TList; function GetRunning: Boolean; function GetExitCode: Integer; constructor Create(AOwner: TObject); @@ -47,7 +47,7 @@ type function ReadOutput: string; procedure WaitOnExit; property Executable: string read FExe write FExe; - property Parameters: TStringList read FParameters; + property Parameters: TList read FParameters; property Running: Boolean read GetRunning; property ExitCode: Integer read GetExitCode; end; @@ -57,7 +57,7 @@ implementation constructor TProcess.Create(AOwner: TObject); begin Self.FHandle := ProcessCreate(); - Self.FParameters := TStringList.Create() + Self.FParameters := TList.Create() end; procedure TProcess.Destroy;