stdlib: TProcess.Parameters is TList<string>, not TStringList
Process arguments are only ever appended and iterated (Add/Get/Count) — none of the TStringList-specific API is used by any consumer, so TList<string> 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.
This commit is contained in:
parent
c81d65bb78
commit
b8de722038
|
|
@ -32,13 +32,13 @@ unit Process;
|
|||
|
||||
interface
|
||||
|
||||
uses Classes;
|
||||
uses Generics.Collections;
|
||||
|
||||
type
|
||||
TProcess = class
|
||||
FHandle: Pointer;
|
||||
FExe: string;
|
||||
FParameters: TStringList;
|
||||
FParameters: TList<string>;
|
||||
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<string> 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<string>.Create()
|
||||
end;
|
||||
|
||||
procedure TProcess.Destroy;
|
||||
|
|
|
|||
Loading…
Reference in a new issue