* converted the result of fullownerhierarchyname to tsymstr so it (and

contcatenations based on it) can be longer than 255 characters in
    case tsymstr=ansistring

git-svn-id: trunk@32412 -
This commit is contained in:
Jonas Maebe 2015-11-21 12:37:04 +00:00
parent eaeb9d8351
commit 9a0cb50a08
2 changed files with 19 additions and 7 deletions

View File

@ -64,7 +64,11 @@ interface
tstoreddef = class(tdef)
private
{$ifdef symansistr}
_fullownerhierarchyname : ansistring;
{$else symansistr}
_fullownerhierarchyname : pshortstring;
{$endif symansistr}
procedure writeentry(ppufile: tcompilerppufile; ibnr: byte);
protected
typesymderef : tderef;
@ -110,7 +114,7 @@ interface
function needs_inittable : boolean;override;
function rtti_mangledname(rt:trttitype):TSymStr;override;
function OwnerHierarchyName: string; override;
function fullownerhierarchyname:string;override;
function fullownerhierarchyname:TSymStr;override;
function needs_separate_initrtti:boolean;override;
function in_currentunit: boolean;
{ regvars }
@ -1749,7 +1753,9 @@ implementation
dispose(pderef(genericparaderefs[i]));
genericparaderefs.free;
genconstraintdata.free;
{$ifndef symansistr}
stringdispose(_fullownerhierarchyname);
{$endif not symansistr}
inherited destroy;
end;
@ -1856,15 +1862,17 @@ implementation
until tmp=nil;
end;
function tstoreddef.fullownerhierarchyname: string;
function tstoreddef.fullownerhierarchyname: TSymStr;
var
tmp: tdef;
begin
{$ifdef symansistr}
if _fullownerhierarchyname<>'' then
exit(_fullownerhierarchyname);
{$else symansistr}
if assigned(_fullownerhierarchyname) then
begin
result:=_fullownerhierarchyname^;
exit;
end;
exit(_fullownerhierarchyname^);
{$endif symansistr}
{ the def can only reside inside structured types or
procedures/functions/methods }
tmp:=self;
@ -1883,7 +1891,11 @@ implementation
if tmp.typ=procdef then
result:=tprocdef(tmp).customprocname([pno_paranames,pno_proctypeoption])+'.'+result;
until tmp=nil;
{$ifdef symansistr}
_fullownerhierarchyname:=result;
{$else symansistr}
_fullownerhierarchyname:=stringdup(result);
{$endif symansistr}
end;

View File

@ -75,7 +75,7 @@ interface
function getmangledparaname:TSymStr;virtual;
function rtti_mangledname(rt:trttitype):TSymStr;virtual;abstract;
function OwnerHierarchyName: string; virtual; abstract;
function fullownerhierarchyname:string;virtual;abstract;
function fullownerhierarchyname:TSymStr;virtual;abstract;
function unique_id_str: string;
function size:asizeint;virtual;abstract;
function packedbitsize:asizeint;virtual;