mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 15:11:33 +01:00
* fix compilation on 64 Bit targets
git-svn-id: trunk@19393 -
This commit is contained in:
parent
fe782eac07
commit
cd2488d177
@ -179,11 +179,11 @@ type
|
|||||||
function MoveNext: Boolean;
|
function MoveNext: Boolean;
|
||||||
property Current: Pointer read GetCurrent;
|
property Current: Pointer read GetCurrent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef VER2_4}
|
{$ifdef VER2_4}
|
||||||
type
|
type
|
||||||
TDirection = (FromBeginning, FromEnd);
|
TDirection = (FromBeginning, FromEnd);
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
TFPList = class(TObject)
|
TFPList = class(TObject)
|
||||||
private
|
private
|
||||||
@ -205,7 +205,7 @@ type
|
|||||||
procedure SetCount(NewCount: Integer);
|
procedure SetCount(NewCount: Integer);
|
||||||
Procedure RaiseIndexError(Index: Integer);
|
Procedure RaiseIndexError(Index: Integer);
|
||||||
public
|
public
|
||||||
{$IFNDEF VER2_4}
|
{$IFNDEF VER2_4}
|
||||||
Type
|
Type
|
||||||
TDirection = (FromBeginning, FromEnd);
|
TDirection = (FromBeginning, FromEnd);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -572,7 +572,7 @@ type
|
|||||||
function GetName(Index: Integer): string;
|
function GetName(Index: Integer): string;
|
||||||
function GetValue(const Name: string): string;
|
function GetValue(const Name: string): string;
|
||||||
Function GetLBS : TTextLineBreakStyle;
|
Function GetLBS : TTextLineBreakStyle;
|
||||||
Procedure SetLBS (AValue : TTextLineBreakStyle);
|
Procedure SetLBS (AValue : TTextLineBreakStyle);
|
||||||
procedure ReadData(Reader: TReader);
|
procedure ReadData(Reader: TReader);
|
||||||
procedure SetCommaText(const Value: string);
|
procedure SetCommaText(const Value: string);
|
||||||
procedure SetStringsAdapter(const Value: IStringsAdapter);
|
procedure SetStringsAdapter(const Value: IStringsAdapter);
|
||||||
@ -773,7 +773,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
{ TStream abstract class }
|
{ TStream abstract class }
|
||||||
|
|
||||||
@ -924,7 +924,7 @@ type
|
|||||||
private
|
private
|
||||||
FBytes: TBytes;
|
FBytes: TBytes;
|
||||||
protected
|
protected
|
||||||
function Realloc(var NewCapacity: Longint): Pointer; override;
|
function Realloc(var NewCapacity: PtrInt): Pointer; override;
|
||||||
public
|
public
|
||||||
constructor Create(const ABytes: TBytes); overload;
|
constructor Create(const ABytes: TBytes); overload;
|
||||||
property Bytes: TBytes read FBytes;
|
property Bytes: TBytes read FBytes;
|
||||||
@ -1227,7 +1227,7 @@ type
|
|||||||
function ReadIdent: string;
|
function ReadIdent: string;
|
||||||
function ReadInteger: Longint;
|
function ReadInteger: Longint;
|
||||||
function ReadInt64: Int64;
|
function ReadInt64: Int64;
|
||||||
function ReadSet(EnumType: Pointer): Integer;
|
function ReadSet(EnumType: Pointer): Integer;
|
||||||
procedure ReadListBegin;
|
procedure ReadListBegin;
|
||||||
procedure ReadListEnd;
|
procedure ReadListEnd;
|
||||||
function ReadRootComponent(ARoot: TComponent): TComponent;
|
function ReadRootComponent(ARoot: TComponent): TComponent;
|
||||||
@ -1406,7 +1406,7 @@ type
|
|||||||
procedure WriteIdent(const Ident: string);
|
procedure WriteIdent(const Ident: string);
|
||||||
procedure WriteInteger(Value: Longint); overload;
|
procedure WriteInteger(Value: Longint); overload;
|
||||||
procedure WriteInteger(Value: Int64); overload;
|
procedure WriteInteger(Value: Int64); overload;
|
||||||
procedure WriteSet(Value: LongInt; SetType: Pointer);
|
procedure WriteSet(Value: LongInt; SetType: Pointer);
|
||||||
procedure WriteListBegin;
|
procedure WriteListBegin;
|
||||||
procedure WriteListEnd;
|
procedure WriteListEnd;
|
||||||
procedure WriteRootComponent(ARoot: TComponent);
|
procedure WriteRootComponent(ARoot: TComponent);
|
||||||
@ -1583,7 +1583,7 @@ type
|
|||||||
procedure FreeOnRelease;
|
procedure FreeOnRelease;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IInterfaceComponentReference = interface
|
IInterfaceComponentReference = interface
|
||||||
['{3FEEC8E1-E400-4A24-BCAC-1F01476439B1}']
|
['{3FEEC8E1-E400-4A24-BCAC-1F01476439B1}']
|
||||||
function GetComponent:TComponent;
|
function GetComponent:TComponent;
|
||||||
end;
|
end;
|
||||||
@ -1677,7 +1677,7 @@ type
|
|||||||
// fpdoc doesn't handle this yet :(
|
// fpdoc doesn't handle this yet :(
|
||||||
{$ifndef fpdocsystem}
|
{$ifndef fpdocsystem}
|
||||||
function IInterfaceComponentReference.GetComponent=iicrgetcomponent;
|
function IInterfaceComponentReference.GetComponent=iicrgetcomponent;
|
||||||
{$endif}
|
{$endif}
|
||||||
procedure WriteState(Writer: TWriter); virtual;
|
procedure WriteState(Writer: TWriter); virtual;
|
||||||
constructor Create(AOwner: TComponent); virtual;
|
constructor Create(AOwner: TComponent); virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|||||||
@ -667,7 +667,7 @@ function TMemoryStream.Realloc(var NewCapacity: PtrInt): Pointer;
|
|||||||
begin
|
begin
|
||||||
If NewCapacity<0 Then
|
If NewCapacity<0 Then
|
||||||
NewCapacity:=0
|
NewCapacity:=0
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
// if growing, grow at least a quarter
|
// if growing, grow at least a quarter
|
||||||
if (NewCapacity>FCapacity) and (NewCapacity < (5*FCapacity) div 4) then
|
if (NewCapacity>FCapacity) and (NewCapacity < (5*FCapacity) div 4) then
|
||||||
@ -767,7 +767,7 @@ begin
|
|||||||
FCapacity:=Length(FBytes);
|
FCapacity:=Length(FBytes);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBytesStream.Realloc(var NewCapacity: Longint): Pointer;
|
function TBytesStream.Realloc(var NewCapacity: PtrInt): Pointer;
|
||||||
begin
|
begin
|
||||||
// adapt TMemoryStream code to use with dynamic array
|
// adapt TMemoryStream code to use with dynamic array
|
||||||
if NewCapacity<0 Then
|
if NewCapacity<0 Then
|
||||||
@ -984,7 +984,7 @@ begin
|
|||||||
FreeAndNil(FStream);
|
FreeAndNil(FStream);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$warnings off}
|
{$warnings off}
|
||||||
function TStreamAdapter.Read(pv: Pointer; cb: DWORD; pcbRead: PDWORD): HResult; stdcall;
|
function TStreamAdapter.Read(pv: Pointer; cb: DWORD; pcbRead: PDWORD): HResult; stdcall;
|
||||||
var
|
var
|
||||||
@ -1039,10 +1039,10 @@ begin
|
|||||||
STREAM_SEEK_SET: newpos := FStream.Seek(dlibMove, soBeginning);
|
STREAM_SEEK_SET: newpos := FStream.Seek(dlibMove, soBeginning);
|
||||||
STREAM_SEEK_CUR: newpos := FStream.Seek(dlibMove, soCurrent);
|
STREAM_SEEK_CUR: newpos := FStream.Seek(dlibMove, soCurrent);
|
||||||
STREAM_SEEK_END: newpos := FStream.Seek(dlibMove, soEnd);
|
STREAM_SEEK_END: newpos := FStream.Seek(dlibMove, soEnd);
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Result := STG_E_INVALIDFUNCTION;
|
Result := STG_E_INVALIDFUNCTION;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if @libNewPosition <> nil then
|
if @libNewPosition <> nil then
|
||||||
@ -1145,7 +1145,7 @@ begin
|
|||||||
if @statstg <> nil then
|
if @statstg <> nil then
|
||||||
begin
|
begin
|
||||||
fillchar(statstg, sizeof(TStatStg),#0);
|
fillchar(statstg, sizeof(TStatStg),#0);
|
||||||
|
|
||||||
{ //TODO handle pwcsName
|
{ //TODO handle pwcsName
|
||||||
if grfStatFlag = STATFLAG_DEFAULT then
|
if grfStatFlag = STATFLAG_DEFAULT then
|
||||||
runerror(217) //Result :={$ifdef windows} STG_E_INVALIDFLAG{$else}E_INVALID_FLAG{$endif}
|
runerror(217) //Result :={$ifdef windows} STG_E_INVALIDFLAG{$else}E_INVALID_FLAG{$endif}
|
||||||
@ -1158,7 +1158,7 @@ begin
|
|||||||
Result := S_OK;
|
Result := S_OK;
|
||||||
end else
|
end else
|
||||||
Result := STG_E_INVALIDFLAG
|
Result := STG_E_INVALIDFLAG
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TStreamAdapter.Clone(out stm: IStream): HResult; stdcall;
|
function TStreamAdapter.Clone(out stm: IStream): HResult; stdcall;
|
||||||
begin
|
begin
|
||||||
@ -1195,11 +1195,11 @@ end;
|
|||||||
function TProxyStream.GetIStream: IStream;
|
function TProxyStream.GetIStream: IStream;
|
||||||
begin
|
begin
|
||||||
Result := FStream;
|
Result := FStream;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProxyStream.Check(err:integer);
|
procedure TProxyStream.Check(err:integer);
|
||||||
var e : EInOutError;
|
var e : EInOutError;
|
||||||
begin
|
begin
|
||||||
e:= EInOutError.Create('Proxystream.Check');
|
e:= EInOutError.Create('Proxystream.Check');
|
||||||
e.Errorcode:=err;
|
e.Errorcode:=err;
|
||||||
raise e;
|
raise e;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user