This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: wcstod/wcstof
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Fri, 6 Feb 2009 12:30:34 +0100
- Subject: Re: wcstod/wcstof
- References: <20090206102954.GC16129@calimero.vinschen.de>
- Reply-to: newlib at sourceware dot org
On Feb 6 11:29, Corinna Vinschen wrote:
> Hi,
>
> there are two possible ways to implement wcstod/wcstof:
>
> o Convert the wchar string to multibyte and call strtod.
>
> + Very tiny code. Good for embedded targets.
> - The endptr position is not reliable.
> - Slower than strtod.
>
> o Copy the entire code from strtod.c and just
...convert all chars to wchars.
>
> + As fast as strtod.
> + Reliable endptr.
> - Much bigger code.
>
> Which solution is preferrable for newlib? Maybe both, dependent on
> PREFER_SIZE_OVER_SPEED/__OPTIMIZE_SIZE__?
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat