[fpc-pascal] SetPropValue: value as string does not work for Chars and Booleans

silvioprog silvioprog at gmail.com
Sat Jun 13 19:19:42 CEST 2015


On Sat, Jun 13, 2015 at 7:04 AM, Michael Van Canneyt <michael at freepascal.org
> wrote:

> On Sat, 13 Jun 2015, silvioprog wrote:
>
>> On Thu, Jun 11, 2015 at 2:26 AM, silvioprog <silvioprog at gmail.com> wrote:
>>       Hello,
>> Trying to set the value 'a' to a property Char and a 'True' to a Boolean
>> property, I got some errors (logs in attached) in function
>> 'TypInfo.SetPropValue'. But I did the same test in Delphi XE
>> 7 and also in Delphi 7 (after some changes in my demo, shure), and it
>> worked fine. So I decided to test other property types looking for more
>> errors.
>>
>> I attached a small project simulating a test-case, testing the function
>> 'TypInfo.SetPropValue' with commum primitive types in FPC and Delphi.
>>
>> Please see the LOG_*.TXT files, it has the comparition between FPC
>> (trunk) and Delphi  (XE7), both tests done in 32 and 64 CPUs.
>>
>> Is this bug or a normal behaviour of FPC RTTI? If you confirm it as but,
>> I can try to send a patch to fix that.
>>
>> Thank you!
>>
>>
>> Nobody? =/
>>
>> It seems that current FPC SetPropValue looks like Delphi 7, but IMHO this
>> function could follow the new Delphi implementation, including new unicode
>> support. BTW, if anyone confirm it as bug, I can
>> try to make a patch and send it via bugtracker.
>>
>>
> Please do. Include your test program.
>
> Michael.


Nice.

Done in:

http://bugs.freepascal.org/view.php?id=28290

It could be related to:

http://bugs.freepascal.org/view.php?id=28278 (patch for fix attached there)

Thank buddy! (y)

-- 
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150613/c20fa8a1/attachment.html>


More information about the fpc-pascal mailing list