RE: [fpc-devel] THandle and 64bit platforms

2004-12-22 Thread Marc Weustink
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Florian
>Klaempfl
>Sent: dinsdag 21 december 2004 8:30
>
>Peter Vreman wrote:
>
That said, the RTL should also avoid confusion with the Windows/Delphi
THandle type, and introduce a cross-platform and opaque TFileHandle
type.
>>>
>>>It's text/file/file of in pascal ;)
>>>
>>>
Which will happen to be equal to THandle on 32-bit windows.
On 32-bit Linux, the definition of THandle will then also equal
TFileHandle.

This will also take some work :-)
>>>
>>>I guess this is no solution. It makes porting delphi apps very hard.
>>>What's the problem if thandle is 64 bit on 64 bit systems? You
>>>can still store a 32 bit file handle in it.
>>
>>
>> It'll give a lot of Warnings when compiling the sources. And there is a
>> risk for rangecheck errors.
>>
>> I checked Kylix, there THandle=longword which is also incompatible with
>> our THandle=longint under Linux.
>>
>> My proposal is to rename the current THandle to TFileHandle. And add an
>> platform independent type "THandle=PtrUInt".
>> Note that this can still cause range check errors under Unix, because
>> invalid filedescriptors have (normally) value -1.
>
>Sounds good to me.

This would be nice

Marc


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] TList slowness in classes

2004-12-22 Thread Ales Katona
I've read a complaint about TList being slow so I decided to give it a test.
Quite frankly the test showed this is truth, but I couldn't find out why.
I found out that if I copy the TList from classes "as-is" into my unit 
and use this
copy, it is about 3x faster in certain conditions. I have no idea why 
this is so but
I think there's something wrong...

I posted my test at http://members.chello.sk/ales/testlist.zip
Just download, unzip and compile:
you'll get swap time and access time for the original TList
uncomment {$DEFINE USEMYLIST} to get the times for my copy of TList
The copy there is unchanged.
Ales Katona
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel