[Lazarus] PDF generator, try 2

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu Apr 7 13:49:06 CEST 2016


On 2016-04-07 12:25, Martok wrote:
> If Move+FillChar would use out instead of var (as they should - they don't read
> the dest value, that's the whole point), that would be fixed once and for all.
> But I remember having this discussion before and apparently it was like this for
> some compatibility reason...

I was about to mention that. This was discussed before, and there was a
reason (which eludes me now) why FillChar() will not be changed. And
that is also when I came up with the FillMem() solution.

If FPC starts nagging about uninitialised pointer parameters (as in the
usage by FillMem(...) ), then I am afraid there is *no solution* to get
rid of that compiler hint for FPC 2.6.4.

I haven't looked at what FPC 3.0's Default() function does yet, but
maybe FPC could implement a FillMem() exactly like FillChar() but with
an out parameter instead. So then FillChar() is there for whatever
backward compatibility, and FillMem() could be used going forward to get
rid of that compiler hint.  Then again, I probably made this suggestion
in our previous discussions on this topic. ;-)

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp




More information about the Lazarus mailing list