Page 2 of 2

Posted: 13.06.2008, 14:54
by Dr Mac
gto wrote: Hum :)

Good to know that it's working =)

Can you make a benchmark concerning Lazarus 32 and 64 ? It would be interesting!
So...
I have only a 64 bit system, my 32 bit Debian is in a Virtualbox machine. Benchmarking this install maybe leads some strange result :lol:

Posted: 13.06.2008, 17:21
by gto
hgourvest wrote:Dr Mac,

You should used PtrInt datatype instead of Int64 for transtyping.

{$IFNDEF FPC}
PtrInt = longint;
{$ENDIF}

herni
Well, as I already said, I'm no expert in 64-bits platform, but the previous code used LongInt and it didn't worked, 'cause LongInt is 32 bits and theses changes take portions of code where the memory address is converted to an integer, to get a "particular hash" of every object.

Maybe you meant to answer PtrInt64, which would be a pointer to a Int64, but even this don't make sense to me.

Posted: 15.06.2008, 22:53
by mdaems
gto,
I think Henri means you should use Result := PtrInt(Self) instead of Result := LongInt(Self) and declare PtrInt for the non-fpc compilers as a longint.
This way fpc64 uses an Int64 and all other compilers a longint.

Mark

Posted: 16.06.2008, 14:17
by gto
mdaems wrote:gto,
I think Henri means you should use Result := PtrInt(Self) instead of Result := LongInt(Self) and declare PtrInt for the non-fpc compilers as a longint.
This way fpc64 uses an Int64 and all other compilers a longint.

Mark
AH! Right ;)
didn't get it from first time ;)