From 84da5e619c4adc3c72c5a6f2da80c56be2899a72 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 13 Sep 2024 22:12:20 +0200 Subject: [PATCH] * use also an FNV hash to shorten interface wrapper names --- compiler/ncgvmt.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/ncgvmt.pas b/compiler/ncgvmt.pas index 3c9e12474b..d6f653650a 100644 --- a/compiler/ncgvmt.pas +++ b/compiler/ncgvmt.pas @@ -735,7 +735,7 @@ implementation realintfdef: tobjectdef; tmpstr : AnsiString; hs : TSymStr; - crc : DWord; + hash : QWord; begin realintfdef:=AImplIntf.IntfDef; while realintfdef.is_unique_objpasdef do @@ -744,9 +744,9 @@ implementation tmpstr:=_class.objname^+'_$_'+make_mangledname('',realintfdef.owner,'')+'_$$_'+realintfdef.objname^+'_$_'+tostr(i)+'_$_'+pd.mangledname; if length(tmpstr)>50 then begin - crc:=0; - crc:=UpdateCrc32(crc,tmpstr[51],length(tmpstr)-50); - hs:=copy(tmpstr,1,50)+'$CRC'+hexstr(crc,8); + hash:=0; + hash:=UpdateFnv64(hash,tmpstr[51],length(tmpstr)-50); + hs:=copy(tmpstr,1,50)+'$H'+Base64Mangle(hash); end else hs:=tmpstr;