[fpc-devel] Redefine FillChar() to use out parameter instead

Martin lazarus at mfriebe.de
Thu Nov 19 11:57:53 CET 2009


Alexander Klenin wrote:
> On Thu, Nov 19, 2009 at 20:46, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>   
>> On 19 Nov 2009, at 11:42, Alexander Klenin wrote
>>> No, I asked for an example of code that would be negatively affected by
>>> changing "var" to "out" in FillChar parameter.
>>>       
>> I don't know by heart anymore, but as I mentioned the compiler crashed when
>> I tried that (or if you did that move, which has the same problem). There is
>> probably rtl or generated initialisation code that depends on the current
>> semantics of move/fillchar).
>>     
>
> So, we are unable to fix FillChar because it would uncover bugs hiding
> in the other places? ;-)
Why? the other places use fillchar in exactly they way it is supposed to 
be used. Setting ref-counted types while bypassing the normal 
ref-counted finalization. That isn't a bug.

fillchar wih var or out are 2 different functions, providing a different 
functionality (even though they do overlap quite a bit)

Martin




More information about the fpc-devel mailing list