mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 18:50:37 +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/tw8312.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw8321.pp svneol=native#text/plain
|
tests/webtbs/tw8321.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw8371.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/tw8391.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw8434.pp svneol=native#text/plain
|
tests/webtbs/tw8434.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw8462.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/uw6767.pp svneol=native#text/plain
|
||||||
tests/webtbs/uw7381.pp svneol=native#text/plain
|
tests/webtbs/uw7381.pp svneol=native#text/plain
|
||||||
tests/webtbs/uw8180.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 svneol=native#text/plain
|
||||||
utils/Makefile.fpc svneol=native#text/plain
|
utils/Makefile.fpc svneol=native#text/plain
|
||||||
utils/README -text
|
utils/README -text
|
||||||
|
@ -43,7 +43,7 @@ type
|
|||||||
{$endif Test_Double_checksum}
|
{$endif Test_Double_checksum}
|
||||||
|
|
||||||
const
|
const
|
||||||
CurrentPPUVersion=78;
|
CurrentPPUVersion=79;
|
||||||
|
|
||||||
{ buffer sizes }
|
{ buffer sizes }
|
||||||
maxentrysize = 1024;
|
maxentrysize = 1024;
|
||||||
|
@ -512,7 +512,7 @@ implementation
|
|||||||
list.concat(Tai_const.Createname(tlabelsym(srsym).mangledname,offset));
|
list.concat(Tai_const.Createname(tlabelsym(srsym).mangledname,offset));
|
||||||
constsym :
|
constsym :
|
||||||
if tconstsym(srsym).consttyp=constresourcestring then
|
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
|
else
|
||||||
Message(type_e_variable_id_expected);
|
Message(type_e_variable_id_expected);
|
||||||
else
|
else
|
||||||
|
@ -249,7 +249,6 @@ interface
|
|||||||
constdefderef : tderef;
|
constdefderef : tderef;
|
||||||
consttyp : tconsttyp;
|
consttyp : tconsttyp;
|
||||||
value : tconstvalue;
|
value : tconstvalue;
|
||||||
resstrindex : longint; { needed for resource strings }
|
|
||||||
constructor create_ord(const n : string;t : tconsttyp;v : tconstexprint;def:tdef);
|
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_ordptr(const n : string;t : tconsttyp;v : tconstptruint;def:tdef);
|
||||||
constructor create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);
|
constructor create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);
|
||||||
@ -1496,7 +1495,6 @@ implementation
|
|||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
consttyp:=t;
|
consttyp:=t;
|
||||||
value.valueord:=v;
|
value.valueord:=v;
|
||||||
ResStrIndex:=0;
|
|
||||||
constdef:=def;
|
constdef:=def;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1507,7 +1505,6 @@ implementation
|
|||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
consttyp:=t;
|
consttyp:=t;
|
||||||
value.valueordptr:=v;
|
value.valueordptr:=v;
|
||||||
ResStrIndex:=0;
|
|
||||||
constdef:=def;
|
constdef:=def;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1518,7 +1515,6 @@ implementation
|
|||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
consttyp:=t;
|
consttyp:=t;
|
||||||
value.valueptr:=v;
|
value.valueptr:=v;
|
||||||
ResStrIndex:=0;
|
|
||||||
constdef:=def;
|
constdef:=def;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1580,8 +1576,6 @@ implementation
|
|||||||
value.len:=ppufile.getlongint;
|
value.len:=ppufile.getlongint;
|
||||||
getmem(pc,value.len+1);
|
getmem(pc,value.len+1);
|
||||||
ppufile.getdata(pc^,value.len);
|
ppufile.getdata(pc^,value.len);
|
||||||
if consttyp=constresourcestring then
|
|
||||||
ResStrIndex:=ppufile.getlongint;
|
|
||||||
value.valueptr:=pc;
|
value.valueptr:=pc;
|
||||||
end;
|
end;
|
||||||
constreal :
|
constreal :
|
||||||
@ -1668,8 +1662,6 @@ implementation
|
|||||||
begin
|
begin
|
||||||
ppufile.putlongint(value.len);
|
ppufile.putlongint(value.len);
|
||||||
ppufile.putdata(pchar(value.valueptr)^,value.len);
|
ppufile.putdata(pchar(value.valueptr)^,value.len);
|
||||||
if consttyp=constresourcestring then
|
|
||||||
ppufile.putlongint(ResStrIndex);
|
|
||||||
end;
|
end;
|
||||||
constreal :
|
constreal :
|
||||||
ppufile.putreal(pbestreal(value.valueptr)^);
|
ppufile.putreal(pbestreal(value.valueptr)^);
|
||||||
|
@ -1471,8 +1471,6 @@ begin
|
|||||||
writeln(space,' Length : ',len);
|
writeln(space,' Length : ',len);
|
||||||
writeln(space,' Value : "',pc,'"');
|
writeln(space,' Value : "',pc,'"');
|
||||||
freemem(pc,len+1);
|
freemem(pc,len+1);
|
||||||
if tconsttyp(b)=constresourcestring then
|
|
||||||
writeln(space,' Index : ',getlongint);
|
|
||||||
end;
|
end;
|
||||||
constreal :
|
constreal :
|
||||||
writeln(space,' Value : ',getreal);
|
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