mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* use voidpointertype.size (supports i8086 far data memory models) instead of
sizeof(pint) to return the size of tabstractpointerdef git-svn-id: trunk@27246 -
This commit is contained in:
parent
7107e9d5ea
commit
97a3f50351
@ -194,6 +194,8 @@ interface
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
procedure buildderef;override;
|
||||
procedure deref;override;
|
||||
function size:asizeint;override;
|
||||
function alignment:shortint;override;
|
||||
end;
|
||||
|
||||
|
||||
@ -2977,7 +2979,6 @@ implementation
|
||||
begin
|
||||
inherited create(dt);
|
||||
pointeddef:=def;
|
||||
savesize:=sizeof(pint);
|
||||
end;
|
||||
|
||||
|
||||
@ -2985,7 +2986,6 @@ implementation
|
||||
begin
|
||||
inherited ppuload(dt,ppufile);
|
||||
ppufile.getderef(pointeddefderef);
|
||||
savesize:=sizeof(pint);
|
||||
end;
|
||||
|
||||
|
||||
@ -3003,6 +3003,18 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function tabstractpointerdef.size: asizeint;
|
||||
begin
|
||||
Result:=voidpointertype.size;
|
||||
end;
|
||||
|
||||
|
||||
function tabstractpointerdef.alignment: shortint;
|
||||
begin
|
||||
alignment:=size_2_align(voidpointertype.size);
|
||||
end;
|
||||
|
||||
|
||||
procedure tabstractpointerdef.ppuwrite(ppufile:tcompilerppufile);
|
||||
begin
|
||||
inherited ppuwrite(ppufile);
|
||||
@ -3154,7 +3166,6 @@ implementation
|
||||
result:=tclassrefdef.create(tforwarddef(pointeddef).getcopy)
|
||||
else
|
||||
result:=tclassrefdef.create(pointeddef);
|
||||
tclassrefdef(result).savesize:=savesize;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user