[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-release-team
Subject: Re: KCalc's Future
From: Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date: 2007-12-08 22:45:51
Message-ID: 475B1E9F.3090203 () gmx ! de
[Download RAW message or body]
Andreas Pakulat schrieb:
> On 08.12.07 23:12:16, Christian Ehrlicher wrote:
>> _knumfloat::_knumfloat(QString const & num)
>> {
>> mpf_init(_mpf);
>> mpf_set_str(_mpf, num.toAscii(), 10);
>> }
>>
>> I already tried to pass "10,0" without success. Don't know if "nan" and
>> "inf" is correctly interpreted.
>
> Does gmp create a deep copy of the char*? If not that might be the
> reason, toAscii() returns a QByteArray and that will be implicitly
> converted to char*. However that returns the QByteArray internal buffer
> and thus its gone after the call to mpf_set_str. So either gmp needs to
> do a deep copy in set_str or you need to keep the QByteArray around
> until its not needed anymore.
>
I hope you're wrong - I would consider this as a design bug in gmp
otherwise :)
Christian
_______________________________________________
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic