mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 12:26:58 +02:00
* fix resourcestring assignment in typedconst
git-svn-id: trunk@7339 -
This commit is contained in:
parent
5c914393d5
commit
aa72495049
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -8190,6 +8190,7 @@ tests/webtbs/tw8304.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8312.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8321.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8371.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8372.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8391.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8434.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8462.pp svneol=native#text/plain
|
||||
@ -8260,6 +8261,7 @@ tests/webtbs/uw6203.pp svneol=native#text/plain
|
||||
tests/webtbs/uw6767.pp svneol=native#text/plain
|
||||
tests/webtbs/uw7381.pp svneol=native#text/plain
|
||||
tests/webtbs/uw8180.pp svneol=native#text/plain
|
||||
tests/webtbs/uw8372.pp svneol=native#text/plain
|
||||
utils/Makefile svneol=native#text/plain
|
||||
utils/Makefile.fpc svneol=native#text/plain
|
||||
utils/README -text
|
||||
|
@ -43,7 +43,7 @@ type
|
||||
{$endif Test_Double_checksum}
|
||||
|
||||
const
|
||||
CurrentPPUVersion=78;
|
||||
CurrentPPUVersion=79;
|
||||
|
||||
{ buffer sizes }
|
||||
maxentrysize = 1024;
|
||||
|
@ -512,7 +512,7 @@ implementation
|
||||
list.concat(Tai_const.Createname(tlabelsym(srsym).mangledname,offset));
|
||||
constsym :
|
||||
if tconstsym(srsym).consttyp=constresourcestring then
|
||||
list.concat(Tai_const.Createname(make_mangledname('RESOURCESTRINGLIST',tconstsym(srsym).owner,''),tconstsym(srsym).resstrindex*(4+sizeof(aint)*3)+4+sizeof(aint)))
|
||||
list.concat(Tai_const.Createname(make_mangledname('RESSTR',tconstsym(srsym).owner,tconstsym(srsym).name),sizeof(aint)))
|
||||
else
|
||||
Message(type_e_variable_id_expected);
|
||||
else
|
||||
@ -1077,7 +1077,7 @@ implementation
|
||||
begin
|
||||
flush_packed_value(list,bp);
|
||||
curroffset:=align(curroffset,8);
|
||||
end;
|
||||
end;
|
||||
read_typed_const_data(list,tfieldvarsym(srsym).vardef);
|
||||
end
|
||||
else
|
||||
|
@ -249,7 +249,6 @@ interface
|
||||
constdefderef : tderef;
|
||||
consttyp : tconsttyp;
|
||||
value : tconstvalue;
|
||||
resstrindex : longint; { needed for resource strings }
|
||||
constructor create_ord(const n : string;t : tconsttyp;v : tconstexprint;def:tdef);
|
||||
constructor create_ordptr(const n : string;t : tconsttyp;v : tconstptruint;def:tdef);
|
||||
constructor create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);
|
||||
@ -1496,7 +1495,6 @@ implementation
|
||||
fillchar(value, sizeof(value), #0);
|
||||
consttyp:=t;
|
||||
value.valueord:=v;
|
||||
ResStrIndex:=0;
|
||||
constdef:=def;
|
||||
end;
|
||||
|
||||
@ -1507,7 +1505,6 @@ implementation
|
||||
fillchar(value, sizeof(value), #0);
|
||||
consttyp:=t;
|
||||
value.valueordptr:=v;
|
||||
ResStrIndex:=0;
|
||||
constdef:=def;
|
||||
end;
|
||||
|
||||
@ -1518,7 +1515,6 @@ implementation
|
||||
fillchar(value, sizeof(value), #0);
|
||||
consttyp:=t;
|
||||
value.valueptr:=v;
|
||||
ResStrIndex:=0;
|
||||
constdef:=def;
|
||||
end;
|
||||
|
||||
@ -1580,8 +1576,6 @@ implementation
|
||||
value.len:=ppufile.getlongint;
|
||||
getmem(pc,value.len+1);
|
||||
ppufile.getdata(pc^,value.len);
|
||||
if consttyp=constresourcestring then
|
||||
ResStrIndex:=ppufile.getlongint;
|
||||
value.valueptr:=pc;
|
||||
end;
|
||||
constreal :
|
||||
@ -1668,8 +1662,6 @@ implementation
|
||||
begin
|
||||
ppufile.putlongint(value.len);
|
||||
ppufile.putdata(pchar(value.valueptr)^,value.len);
|
||||
if consttyp=constresourcestring then
|
||||
ppufile.putlongint(ResStrIndex);
|
||||
end;
|
||||
constreal :
|
||||
ppufile.putreal(pbestreal(value.valueptr)^);
|
||||
|
@ -1471,8 +1471,6 @@ begin
|
||||
writeln(space,' Length : ',len);
|
||||
writeln(space,' Value : "',pc,'"');
|
||||
freemem(pc,len+1);
|
||||
if tconsttyp(b)=constresourcestring then
|
||||
writeln(space,' Index : ',getlongint);
|
||||
end;
|
||||
constreal :
|
||||
writeln(space,' Value : ',getreal);
|
||||
|
13
tests/webtbs/tw8372.pp
Normal file
13
tests/webtbs/tw8372.pp
Normal file
@ -0,0 +1,13 @@
|
||||
program a;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
{$IFDEF fpc}
|
||||
{$mode delphi}
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
uses SysUtils,uw8372;
|
||||
|
||||
begin
|
||||
writeln(sChromatogram);
|
||||
end.
|
15
tests/webtbs/uw8372.pp
Normal file
15
tests/webtbs/uw8372.pp
Normal file
@ -0,0 +1,15 @@
|
||||
unit uw8372;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
sChromatogram='Chromatogram';
|
||||
|
||||
var
|
||||
ps:PResStringRec=@sChromatogram;
|
||||
|
||||
|
||||
implementation
|
||||
end.
|
Loading…
Reference in New Issue
Block a user