Recent

Author Topic: [SOLVED] Code cleanup at lcl/interfaces/customdrawn/customdrawnobject_x11.inc  (Read 2145 times)

lagprogramming

  • Sr. Member
  • ****
  • Posts: 407
lcl/interfaces/customdrawn/customdrawnobject_x11.inc contains the following lines:
Code: Pascal  [Select][+][-]
  1. // The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +
  2. function XOpenIM(para1: PDisplay; para2: PXrmHashBucketRec; para3: Pchar; para4: Pchar): PXIM; cdecl; external;
  3. function XCreateIC(para1: PXIM; para2: array of const): PXIC; cdecl; external;

The presence of the mentioned redefines has become obsolete since fpc's commit 14e6dcf8
https://gitlab.com/freepascal.org/fpc/source/-/commit/14e6dcf8161e55ace1837ea785ab3961deebb533
The commit modified the file packages/x11/src/xlib.pp in order to fix the routine declarations.
This means that the redefines found in the LCL have become obsolete by 11 years.

The situation is similar with the one presented at:
https://forum.lazarus.freepascal.org/index.php/topic,63893.0.html
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/81002eb2eddfe24fe3533ca78bfe36364b89105d
The following patch removes the obsolete redefines from LCL.
Code: Pascal  [Select][+][-]
  1. diff --git a/lcl/interfaces/customdrawn/customdrawnobject_x11.inc b/lcl/interfaces/customdrawn/customdrawnobject_x11.inc
  2. index 9ea9b65f5a..d2bec3a01b 100644
  3. --- a/lcl/interfaces/customdrawn/customdrawnobject_x11.inc
  4. +++ b/lcl/interfaces/customdrawn/customdrawnobject_x11.inc
  5. @@ -13,10 +13,6 @@
  6.  }
  7.  
  8.  
  9. -// The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +
  10. -function XOpenIM(para1: PDisplay; para2: PXrmHashBucketRec; para3: Pchar; para4: Pchar): PXIM; cdecl; external;
  11. -function XCreateIC(para1: PXIM; para2: array of const): PXIC; cdecl; external;
  12. -
  13.  procedure MyXConnectionWatchProc(display: PDisplay; client_data: TXPointer;
  14.    fd: cint; opening: XLib.TBool; watch_data: PXPointer); cdecl;
  15.  begin
« Last Edit: July 19, 2023, 12:09:31 pm by lagprogramming »


 

TinyPortal © 2005-2018