Forum > CustomDrawn
[SOLVED] Code cleanup at lcl/interfaces/customdrawn/customdrawnobject_x11.inc
(1/1)
lagprogramming:
lcl/interfaces/customdrawn/customdrawnobject_x11.inc contains the following lines:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---// The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +function XOpenIM(para1: PDisplay; para2: PXrmHashBucketRec; para3: Pchar; para4: Pchar): PXIM; cdecl; external;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 [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---diff --git a/lcl/interfaces/customdrawn/customdrawnobject_x11.inc b/lcl/interfaces/customdrawn/customdrawnobject_x11.incindex 9ea9b65f5a..d2bec3a01b 100644--- a/lcl/interfaces/customdrawn/customdrawnobject_x11.inc+++ b/lcl/interfaces/customdrawn/customdrawnobject_x11.inc@@ -13,10 +13,6 @@ } -// The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +-function XOpenIM(para1: PDisplay; para2: PXrmHashBucketRec; para3: Pchar; para4: Pchar): PXIM; cdecl; external;-function XCreateIC(para1: PXIM; para2: array of const): PXIC; cdecl; external;- procedure MyXConnectionWatchProc(display: PDisplay; client_data: TXPointer; fd: cint; opening: XLib.TBool; watch_data: PXPointer); cdecl; begin
AlexTP:
Posted to https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40388
Navigation
[0] Message Index