From b2de7b32771e376b7041c0e4b4f3fdbdeafff01e Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 17 Aug 2009 21:46:25 +0000 Subject: * forbid passing derived classes to call by reference parent classes (for objects, this is still allowed), resolves #13135 git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@13551 3ad0048d-3df7-0310-abae-a5850022a9f2 --- packages/fcl-process/src/process.pp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'packages/fcl-process') diff --git a/packages/fcl-process/src/process.pp b/packages/fcl-process/src/process.pp index 10f94ba811..fd51639424 100644 --- a/packages/fcl-process/src/process.pp +++ b/packages/fcl-process/src/process.pp @@ -82,7 +82,7 @@ Type procedure SetActive(const Value: Boolean); procedure SetEnvironment(const Value: TStrings); function PeekExitStatus: Boolean; - Protected + Protected FRunning : Boolean; FExitCode : Cardinal; FInputStream : TOutputPipeStream; @@ -134,7 +134,7 @@ Type Property WindowWidth : Cardinal Read dwXSize Write SetWindowWidth; Property FillAttribute : Cardinal read FFillAttribute Write FFillAttribute; end; - + EProcess = Class(Exception); implementation @@ -178,9 +178,9 @@ end; Procedure TProcess.FreeStreams; begin If FStderrStream<>FOutputStream then - FreeStream(FStderrStream); - FreeStream(FOutputStream); - FreeStream(FInputStream); + FreeStream(THandleStream(FStderrStream)); + FreeStream(THandleStream(FOutputStream)); + FreeStream(THandleStream(FInputStream)); end; @@ -221,17 +221,17 @@ end; procedure TProcess.CloseInput; begin - FreeStream(FInputStream); + FreeStream(THandleStream(FInputStream)); end; procedure TProcess.CloseOutput; begin - FreeStream(FOutputStream); + FreeStream(THandleStream(FOutputStream)); end; procedure TProcess.CloseStderr; begin - FreeStream(FStderrStream); + FreeStream(THandleStream(FStderrStream)); end; Procedure TProcess.SetWindowColumns (Value : Cardinal); -- cgit v1.2.1