Re: GScanner, strtol() and int64
- From: Joel Becker <jlbec evilplan org>
- To: Tim Janik <timj gtk org>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>, Owen Taylor <otaylor gtk org>
- Subject: Re: GScanner, strtol() and int64
- Date: Fri, 11 Oct 2002 04:59:38 +0100
On Fri, Oct 11, 2002 at 04:47:20AM +0200, Tim Janik wrote:
> it's not clear to me what the best solution would be,
> so i'd like to hear people's opinions on this.
The union additions and the strtoul(3) update are no brainers.
I use strtoul(3) in all my number parsing code.
u64 work is expensive on x86, but I guess that doesn't matter
given this context. For portability's sake, I'd really like to see a
g_ascii_strtoull() and a g_ascii_strtoul(). Why both? Because then
strtoul() is always there without having to do strtoull() (outside of
GScanner).
If anyone is worried about the cost of strtoull() inside
GScanner (I'm not) we could even add a GScanner option maybe to switch.
That might not be binary compatible.
Joel
--
"Not everything that can be counted counts, and not everything
that counts can be counted."
- Albert Einstein
http://www.jlbec.org/
jlbec evilplan org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]