Recent

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

lagprogramming

  • Sr. Member
  • ****
  • Posts: 407
lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc contains the following lines:
Code: Pascal  [Select][+][-]
  1. // redefines:
  2. // The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +
  3. function XmbLookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;
  4. function Xutf8LookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; 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 following patch removes them.
Code: Pascal  [Select][+][-]
  1. diff --git a/lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc b/lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc
  2. index 3fe8cfff4d..87f7038e85 100644
  3. --- a/lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc
  4. +++ b/lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc
  5. @@ -1,10 +1,5 @@
  6.  {%MainUnit customdrawnwsforms.pp}
  7.  
  8. -// redefines:
  9. -// The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +
  10. -function XmbLookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;
  11. -function Xutf8LookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;
  12. -
  13.  { TCDWSCustomForm }
  14.  
  15.  class procedure TCDWSCustomForm.Upda]"]>BlockedtifWMHints(const AWinControl: TWinControl; CanMaximize: Boolean);
« Last Edit: July 07, 2023, 11:11:44 am by lagprogramming »

zeljko

  • Hero Member
  • *****
  • Posts: 1668
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Committed, thanks.

 

TinyPortal © 2005-2018