Re: Exposing `scm_i_mem2number ()'

2006-03-20 Thread Kevin Ryde
[EMAIL PROTECTED] (Ludovic Courtès) writes: > > Below is an updated patch. Looks good, I checked it into the 1.8 branch. (A merge onto the head is coming soon ... of course so is Christmas ... :-) ___ Guile-devel mailing list Guile-devel@gnu.org http:

Re: Exposing `scm_i_mem2number ()'

2006-03-20 Thread Ludovic Courtès
Hi Kevin, Kevin Ryde <[EMAIL PROTECTED]> writes: > Sound's reasonable, though I still don't know what "locale" is doing > in the name if it's only ascii which will work. The documentation (below) should make it clear. ;-) > Should the name be scm_c_locale_stringn_to_number ? >

Re: Exposing `scm_i_mem2number ()'

2006-03-16 Thread Kevin Ryde
[EMAIL PROTECTED] (Ludovic Courtès) writes: > > Can someone comment on it or commit it? Sound's reasonable, though I still don't know what "locale" is doing in the name if it's only ascii which will work. Should the name be scm_c_locale_stringn_to_number ? ^-

Re: Exposing `scm_i_mem2number ()'

2006-03-16 Thread Ludovic Courtès
Hi, About `scm_c_locale_string_to_number ()'... [EMAIL PROTECTED] (Ludovic Courtès) writes: > While writing it, it occurred to me that R5RS does not make it clear > whether `string->number' converts from a number's external > representation or not. As discussed in [0], while R5RS does not expli

Re: Exposing `scm_i_mem2number ()'

2006-03-08 Thread Ludovic Courtès
Hi, [EMAIL PROTECTED] (Ludovic Courtès) writes: > libguile/ > > 2006-02-16 Ludovic Courtès <[EMAIL PROTECTED]> > > * numbers.c (scm_i_mem2number): Renamed to > `scm_c_locale_string_to_number ()'. > Updated callers. > > * numbers.h: Updated function declaration. > >

Re: Exposing `scm_i_mem2number ()'

2006-02-16 Thread Ludovic Courtès
Hello, Marius Vollmer <[EMAIL PROTECTED]> writes: > I'd make it the number of octets, to remain in sync with > scm_from_locale_stringn, etc. Right. Below is a patch that does this. > But, what about scm_string_to_number (scm_from_locale_string (...))? > Isn't that good enough? Using the C var

Re: Exposing `scm_i_mem2number ()'

2006-02-16 Thread Tomas Zerolo
On Wed, Feb 15, 2006 at 11:57:12PM +0200, Marius Vollmer wrote: [...] > But, what about scm_string_to_number (scm_from_locale_string (...))? > Isn't that good enough? Alas, attractive as it is it won't work: number representations vary across locale settings (basically, it's decimal point and thou

Re: Exposing `scm_i_mem2number ()'

2006-02-15 Thread Kevin Ryde
[EMAIL PROTECTED] (Ludovic Courtès) writes: > > However, due to the eventual support for various encodings, we'd rather > need to have something like `scm_c_locale_string_to_number ()'. That could be more relaxed than specifically the "locale" encoding. If all valid numbers are ascii then it doesn

Re: Exposing `scm_i_mem2number ()'

2006-02-15 Thread Marius Vollmer
[EMAIL PROTECTED] (Ludovic Courtès) writes: > I think it'd be nice to export `scm_i_mem2number ()'. My initial plan > was to just rename it `scm_c_string_to_number ()' and document it. > > However, due to the eventual support for various encodings, we'd rather > need to have something like `scm_c

Exposing `scm_i_mem2number ()'

2006-02-15 Thread Ludovic Courtès
Hi, I think it'd be nice to export `scm_i_mem2number ()'. My initial plan was to just rename it `scm_c_string_to_number ()' and document it. However, due to the eventual support for various encodings, we'd rather need to have something like `scm_c_locale_string_to_number ()'. The problem is: ho