[Lazarus] Rescan FPC sources crashes Lazarus

Sven Barth pascaldragon at googlemail.com
Sat Mar 26 21:47:24 CET 2011


On 26.03.2011 20:07, Florian Klämpfl wrote:
> Am 26.03.2011 19:36, schrieb Hans-Peter Diettrich:
>>> Making IsMultiThreaded a function is a no-no: it is used in really
>>> speed critical code paths and using an inline function neither because
>>> it's used mostly in assembler code
>>
>> Simple solution: the variable continues to exist, under a different
>> name. The property only implements Delphi compatibility :-)
>
> Possible, but I fear this is also only half of a solution: a property
> cannot replace a variable, see var parameter problem or assembler code.

What about the following solution:

* add a variable in the implementation section of system.pp that will be 
the real workhorse for "should the RTL be threadsafe" (basically what 
IsMultiThread is now)
* when setting that private variable also set the "old" IsMultiThread 
variable (but never read it inside the RTL)
* provide a setter function for the private "should the RTL be 
threadsafe" variable and document it with a big warning that it is only 
for use inside a thread manager.

Regards,
Sven




More information about the Lazarus mailing list