[lazarus] Delphi and FPC compatible LCL version
Marc Weustink
marc at dommelstein.net
Sat Nov 15 15:17:58 EST 2003
Hmmm.. it seems that I forgot so send my earlier reply.
>From: "Andreas Hausladen" <Andreas.Hausladen at gmx.de>
>
>
> > > Ehm, can you create a diff against CVS.
> >
> > Done. You can download the patch file from
> http://schueler.freepage.de/igvrobotik/Delphi/lclpatch.zip The patch is
> based on .pas
> > files and it contains some new bug fixes.
>
>I have updated the lclpatch.zip file with the newest changes (2003-11-15
>14:21 downloaded 18:40) in LCL and I have removed many
>Delphi dependend IFDEFs.
OK, thanks for it, this one looks a bit better, however....
We (thedevels) have had a litle discussion about it, and the final
conclusion is that the LCL won't support Delphi.
The LCL is written to be used with the FPC compiler and environment to
allow people to build Delphi-like code WITHOUT using Delphi.
Ofcoarse were it the empty function results, unused vars etc. concern, we
will look at every patch separately
Marc.
BTW, while having a quick look at the first 10% of the patch I noticed 2
errors.
1) When comparing pointers, they are unsigned
function ComparePointer(Data1, Data2: Pointer): integer;
begin
- if Data1>Data2 then Result:=-1
- else if Data1<Data2 then Result:=1
+ if Longint(Data1)>Longint(Data2) then Result:=-1
+ else if Longint(Data1)<Longint(Data2) then Result:=1
else Result:=0;
end;
Longint should have been a cardinal here
2) The handling of compiler directives
What if warnings were off ?
+ {$IFNDEF FPC}{$WARNINGS OFF}{$ENDIF}
property Owner: TCustomListView read FOwner;
+ {$IFNDEF FPC}{$WARNINGS ON}{$ENDIF}
More information about the Lazarus
mailing list