* fix compilation on 64 Bit targets

git-svn-id: trunk@19393 -
This commit is contained in:
florian 2011-10-06 17:54:44 +00:00
parent fe782eac07
commit cd2488d177
2 changed files with 22 additions and 22 deletions

View File

@ -179,11 +179,11 @@ type
function MoveNext: Boolean;
property Current: Pointer read GetCurrent;
end;
{$ifdef VER2_4}
{$ifdef VER2_4}
type
TDirection = (FromBeginning, FromEnd);
{$endif}
{$endif}
TFPList = class(TObject)
private
@ -205,7 +205,7 @@ type
procedure SetCount(NewCount: Integer);
Procedure RaiseIndexError(Index: Integer);
public
{$IFNDEF VER2_4}
{$IFNDEF VER2_4}
Type
TDirection = (FromBeginning, FromEnd);
{$ENDIF}
@ -572,7 +572,7 @@ type
function GetName(Index: Integer): string;
function GetValue(const Name: string): string;
Function GetLBS : TTextLineBreakStyle;
Procedure SetLBS (AValue : TTextLineBreakStyle);
Procedure SetLBS (AValue : TTextLineBreakStyle);
procedure ReadData(Reader: TReader);
procedure SetCommaText(const Value: string);
procedure SetStringsAdapter(const Value: IStringsAdapter);
@ -773,7 +773,7 @@ type
end;
{$endif}
{ TStream abstract class }
@ -924,7 +924,7 @@ type
private
FBytes: TBytes;
protected
function Realloc(var NewCapacity: Longint): Pointer; override;
function Realloc(var NewCapacity: PtrInt): Pointer; override;
public
constructor Create(const ABytes: TBytes); overload;
property Bytes: TBytes read FBytes;
@ -1227,7 +1227,7 @@ type
function ReadIdent: string;
function ReadInteger: Longint;
function ReadInt64: Int64;
function ReadSet(EnumType: Pointer): Integer;
function ReadSet(EnumType: Pointer): Integer;
procedure ReadListBegin;
procedure ReadListEnd;
function ReadRootComponent(ARoot: TComponent): TComponent;
@ -1406,7 +1406,7 @@ type
procedure WriteIdent(const Ident: string);
procedure WriteInteger(Value: Longint); overload;
procedure WriteInteger(Value: Int64); overload;
procedure WriteSet(Value: LongInt; SetType: Pointer);
procedure WriteSet(Value: LongInt; SetType: Pointer);
procedure WriteListBegin;
procedure WriteListEnd;
procedure WriteRootComponent(ARoot: TComponent);
@ -1583,7 +1583,7 @@ type
procedure FreeOnRelease;
end;
IInterfaceComponentReference = interface
IInterfaceComponentReference = interface
['{3FEEC8E1-E400-4A24-BCAC-1F01476439B1}']
function GetComponent:TComponent;
end;
@ -1677,7 +1677,7 @@ type
// fpdoc doesn't handle this yet :(
{$ifndef fpdocsystem}
function IInterfaceComponentReference.GetComponent=iicrgetcomponent;
{$endif}
{$endif}
procedure WriteState(Writer: TWriter); virtual;
constructor Create(AOwner: TComponent); virtual;
destructor Destroy; override;

View File

@ -667,7 +667,7 @@ function TMemoryStream.Realloc(var NewCapacity: PtrInt): Pointer;
begin
If NewCapacity<0 Then
NewCapacity:=0
else
else
begin
// if growing, grow at least a quarter
if (NewCapacity>FCapacity) and (NewCapacity < (5*FCapacity) div 4) then
@ -767,7 +767,7 @@ begin
FCapacity:=Length(FBytes);
end;
function TBytesStream.Realloc(var NewCapacity: Longint): Pointer;
function TBytesStream.Realloc(var NewCapacity: PtrInt): Pointer;
begin
// adapt TMemoryStream code to use with dynamic array
if NewCapacity<0 Then
@ -984,7 +984,7 @@ begin
FreeAndNil(FStream);
inherited Destroy;
end;
{$warnings off}
function TStreamAdapter.Read(pv: Pointer; cb: DWORD; pcbRead: PDWORD): HResult; stdcall;
var
@ -1039,10 +1039,10 @@ begin
STREAM_SEEK_SET: newpos := FStream.Seek(dlibMove, soBeginning);
STREAM_SEEK_CUR: newpos := FStream.Seek(dlibMove, soCurrent);
STREAM_SEEK_END: newpos := FStream.Seek(dlibMove, soEnd);
else
begin
Result := STG_E_INVALIDFUNCTION;
Exit;
else
begin
Result := STG_E_INVALIDFUNCTION;
Exit;
end;
end;
if @libNewPosition <> nil then
@ -1145,7 +1145,7 @@ begin
if @statstg <> nil then
begin
fillchar(statstg, sizeof(TStatStg),#0);
{ //TODO handle pwcsName
if grfStatFlag = STATFLAG_DEFAULT then
runerror(217) //Result :={$ifdef windows} STG_E_INVALIDFLAG{$else}E_INVALID_FLAG{$endif}
@ -1158,7 +1158,7 @@ begin
Result := S_OK;
end else
Result := STG_E_INVALIDFLAG
end;
end;
function TStreamAdapter.Clone(out stm: IStream): HResult; stdcall;
begin
@ -1195,11 +1195,11 @@ end;
function TProxyStream.GetIStream: IStream;
begin
Result := FStream;
end;
end;
procedure TProxyStream.Check(err:integer);
var e : EInOutError;
begin
begin
e:= EInOutError.Create('Proxystream.Check');
e.Errorcode:=err;
raise e;