[fpc-devel] Sorting tests

J. Gareth Moreton gareth at moreton-family.com
Mon Nov 28 11:01:07 CET 2022


This is something I want to experiment with now.  Still waiting on 
approval of the TArrayHelper sort merge request though before I start 
playing around with reference counts.

Just want to clarify something... if a type is managed, can it be safely 
typecast to a pointer in all instances and on all platforms? (The 
purpose being so if I wanted to swap two items, so there's no overall 
change in the reference counters, I can simply swap the pointers... 
there's no dereferencing involved!)

Kit

On 28/11/2022 09:43, Michael Van Canneyt via fpc-devel wrote:
>
>
> On Mon, 28 Nov 2022, Sven Barth via fpc-devel wrote:
>
>> Stefan Glienke via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am
>> Mo., 28. Nov. 2022, 00:20:
>>
>>> Probably not unless FPC has something similar to
>>>
>>> https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.IsManagedType 
>>>
>>> (that function among a few others is compiletime evaluated).
>>>
>>
>> It's supported since 3.2.0: 
>> https://wiki.freepascal.org/FPC_New_Features_3.2
>
> And now it is also documented. Tomorrow on the daily docs...
>
> Michael.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>


More information about the fpc-devel mailing list