[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-release-team
Subject:    Re: KCalc's Future
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-12-08 22:38:19
Message-ID: 20071208223819.GA5311 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

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.

Andreas

-- 
Your boss is a few sandwiches short of a picnic.
_______________________________________________
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