mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 06:10:38 +02:00
+ tppufile.putasizeint()
* save/restore tabstractrecordsymtable.datasize as asizeint instead of aint (not ppu version change because they are the same on all production targets) * add shortint() typecasts when reading/writing fieldalignment/ recordalignment fields git-svn-id: trunk@18118 -
This commit is contained in:
parent
13598f1b5f
commit
1c11f6c8b7
@ -287,6 +287,7 @@ type
|
|||||||
procedure putint64(i:int64);
|
procedure putint64(i:int64);
|
||||||
procedure putqword(q:qword);
|
procedure putqword(q:qword);
|
||||||
procedure putaint(i:aint);
|
procedure putaint(i:aint);
|
||||||
|
procedure putasizeint(i:asizeint);
|
||||||
procedure putaword(i:aword);
|
procedure putaword(i:aword);
|
||||||
procedure putreal(d:ppureal);
|
procedure putreal(d:ppureal);
|
||||||
procedure putstring(const s:string);
|
procedure putstring(const s:string);
|
||||||
@ -1272,6 +1273,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure tppufile.putasizeint(i: asizeint);
|
||||||
|
begin
|
||||||
|
putdata(i,sizeof(asizeint));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tppufile.putaword(i:aword);
|
procedure tppufile.putaword(i:aword);
|
||||||
begin
|
begin
|
||||||
putdata(i,sizeof(aword));
|
putdata(i,sizeof(aword));
|
||||||
|
@ -3001,7 +3001,7 @@ implementation
|
|||||||
trecordsymtable(symtable).recordalignment:=shortint(ppufile.getbyte);
|
trecordsymtable(symtable).recordalignment:=shortint(ppufile.getbyte);
|
||||||
trecordsymtable(symtable).padalignment:=shortint(ppufile.getbyte);
|
trecordsymtable(symtable).padalignment:=shortint(ppufile.getbyte);
|
||||||
trecordsymtable(symtable).usefieldalignment:=shortint(ppufile.getbyte);
|
trecordsymtable(symtable).usefieldalignment:=shortint(ppufile.getbyte);
|
||||||
trecordsymtable(symtable).datasize:=ppufile.getaint;
|
trecordsymtable(symtable).datasize:=ppufile.getasizeint;
|
||||||
trecordsymtable(symtable).ppuload(ppufile);
|
trecordsymtable(symtable).ppuload(ppufile);
|
||||||
{ requires usefieldalignment to be set }
|
{ requires usefieldalignment to be set }
|
||||||
symtable.defowner:=self;
|
symtable.defowner:=self;
|
||||||
@ -3086,7 +3086,7 @@ implementation
|
|||||||
ppufile.putbyte(byte(trecordsymtable(symtable).recordalignment));
|
ppufile.putbyte(byte(trecordsymtable(symtable).recordalignment));
|
||||||
ppufile.putbyte(byte(trecordsymtable(symtable).padalignment));
|
ppufile.putbyte(byte(trecordsymtable(symtable).padalignment));
|
||||||
ppufile.putbyte(byte(trecordsymtable(symtable).usefieldalignment));
|
ppufile.putbyte(byte(trecordsymtable(symtable).usefieldalignment));
|
||||||
ppufile.putaint(trecordsymtable(symtable).datasize);
|
ppufile.putasizeint(trecordsymtable(symtable).datasize);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ppufile.writeentry(ibrecorddef);
|
ppufile.writeentry(ibrecorddef);
|
||||||
@ -4384,9 +4384,9 @@ implementation
|
|||||||
if (import_lib^='') then
|
if (import_lib^='') then
|
||||||
stringdispose(import_lib);
|
stringdispose(import_lib);
|
||||||
symtable:=tObjectSymtable.create(self,objrealname^,0);
|
symtable:=tObjectSymtable.create(self,objrealname^,0);
|
||||||
tObjectSymtable(symtable).datasize:=ppufile.getaint;
|
tObjectSymtable(symtable).datasize:=ppufile.getasizeint;
|
||||||
tObjectSymtable(symtable).fieldalignment:=ppufile.getbyte;
|
tObjectSymtable(symtable).fieldalignment:=shortint(ppufile.getbyte);
|
||||||
tObjectSymtable(symtable).recordalignment:=ppufile.getbyte;
|
tObjectSymtable(symtable).recordalignment:=shortint(ppufile.getbyte);
|
||||||
vmt_offset:=ppufile.getlongint;
|
vmt_offset:=ppufile.getlongint;
|
||||||
ppufile.getderef(childofderef);
|
ppufile.getderef(childofderef);
|
||||||
|
|
||||||
@ -4554,9 +4554,9 @@ implementation
|
|||||||
ppufile.putstring(import_lib^)
|
ppufile.putstring(import_lib^)
|
||||||
else
|
else
|
||||||
ppufile.putstring('');
|
ppufile.putstring('');
|
||||||
ppufile.putaint(tObjectSymtable(symtable).datasize);
|
ppufile.putasizeint(tObjectSymtable(symtable).datasize);
|
||||||
ppufile.putbyte(tObjectSymtable(symtable).fieldalignment);
|
ppufile.putbyte(byte(tObjectSymtable(symtable).fieldalignment));
|
||||||
ppufile.putbyte(tObjectSymtable(symtable).recordalignment);
|
ppufile.putbyte(byte(tObjectSymtable(symtable).recordalignment));
|
||||||
ppufile.putlongint(vmt_offset);
|
ppufile.putlongint(vmt_offset);
|
||||||
ppufile.putderef(childofderef);
|
ppufile.putderef(childofderef);
|
||||||
if objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then
|
if objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then
|
||||||
|
Loading…
Reference in New Issue
Block a user