User Changes Trunk

From Free Pascal wiki
Jump to navigationJump to search

About this page

Below you can find a list of intentional changes since the previous release that can change the behaviour of previously working code, along with why these changes were performed and how you can adapt your code if you are affected by them. The list of new features can be found here.

All systems

Unit changes

Several methods of TDataset changes signature (TRecordBuffer)

  • Old behaviour: Several (virtual) methods of TDataset have parameters of type "pchar", which are often called "buffer".
  • New behaviour: The pchar type has been changed to TRecordBuffer. Currently this type is still an alias for p(ansi)char, but in time it will be changed to pbyte for the 2.7.1/2.8.0 branch, which is D2009+ compatible.
  • Reason: Preparation for Delphi 2009+ compatibility and improving of general typing. In Delphi 2009+ (and fully compatible FPC modes in the future) pchar is not pointer to byte anymore. This change will be merged back to 2.6(.2), but with TRecordBuffer=pchar.
  • Remedy: Change the relevant virtual methods to use TRecordBuffer for buffer parameters. Define TRecordBuffer=pansichar to keep older Delphis and FPCs working.

DLLParam changed from Longint into PtrInt

  • Old behaviour: DLLParam was of type Longint even on Win64.
  • New behaviour: DLLParam is now of type PtrInt so also on 64 Bit systems, the full information is kept, especially procedures being used might suffer from this.
  • Remedy: Change the declaration of the procedures used as dll hook to take a PtrInt parameter instead of Longint.

See also