mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:49:09 +02:00
* use also an FNV hash to shorten interface wrapper names
This commit is contained in:
parent
aec11012e8
commit
84da5e619c
@ -735,7 +735,7 @@ implementation
|
|||||||
realintfdef: tobjectdef;
|
realintfdef: tobjectdef;
|
||||||
tmpstr : AnsiString;
|
tmpstr : AnsiString;
|
||||||
hs : TSymStr;
|
hs : TSymStr;
|
||||||
crc : DWord;
|
hash : QWord;
|
||||||
begin
|
begin
|
||||||
realintfdef:=AImplIntf.IntfDef;
|
realintfdef:=AImplIntf.IntfDef;
|
||||||
while realintfdef.is_unique_objpasdef do
|
while realintfdef.is_unique_objpasdef do
|
||||||
@ -744,9 +744,9 @@ implementation
|
|||||||
tmpstr:=_class.objname^+'_$_'+make_mangledname('',realintfdef.owner,'')+'_$$_'+realintfdef.objname^+'_$_'+tostr(i)+'_$_'+pd.mangledname;
|
tmpstr:=_class.objname^+'_$_'+make_mangledname('',realintfdef.owner,'')+'_$$_'+realintfdef.objname^+'_$_'+tostr(i)+'_$_'+pd.mangledname;
|
||||||
if length(tmpstr)>50 then
|
if length(tmpstr)>50 then
|
||||||
begin
|
begin
|
||||||
crc:=0;
|
hash:=0;
|
||||||
crc:=UpdateCrc32(crc,tmpstr[51],length(tmpstr)-50);
|
hash:=UpdateFnv64(hash,tmpstr[51],length(tmpstr)-50);
|
||||||
hs:=copy(tmpstr,1,50)+'$CRC'+hexstr(crc,8);
|
hs:=copy(tmpstr,1,50)+'$H'+Base64Mangle(hash);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
hs:=tmpstr;
|
hs:=tmpstr;
|
||||||
|
Loading…
Reference in New Issue
Block a user