[fpc-pascal] PtrInt - possible candidate to be marked as deprecated

Tony Whyman tony.whyman at mccallumwhyman.com
Wed Mar 18 17:36:13 CET 2015

  QueueAsyncCall takes two arguments - a pointer to a method and data. 
The method declaration must be of the type:

TDataEvent = procedure (Data: PtrInt) of object;

My apps have loads of methods defined as above and would certainly fail 
to compile if the PtrInt type was replaced with Ptruint. At the minimum 
it would require a search and check through all source code to make sure 
that the signed type was not significant followed by a sed script to 
effect the change.

Just for interest, I did a find and grep on the lazarus LCL directory 
(.pas, .pp and .inc) files and found 837 lines on which PtrInt was present.
The lazarus components directory has 474 instances.

On 18/03/15 16:00, Graeme Geldenhuys wrote:
> On 2015-03-18 15:38, Tony Whyman wrote:
>> problem is not whether or not the parameter should be PtrInt or PtrUint,
>> it is currently PtrInt and changing it means a lot of work for any
>> application that uses it.
> If the data you pass in is always positive pointer addresses (I would
> assume this being the norm), then the change will not break any existing
> code.
> But my assumptions have been wrong before. ;-)
> Regards,
>    - Graeme -

More information about the fpc-pascal mailing list