[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mpz_set_str opinion

From: Barubary
Subject: mpz_set_str opinion
Date: Tue, 30 Jul 2002 03:03:24 -0700

I think you should not change the definition of mpz_set_str simply because
there is existing code (however little) that uses that particular feature of
mpz_set_str.  I think you should make mpz_set_str as deprecated and make a
new function with a similar name that breaks at whitespace.  Personally, I
think you should mimic the style of the strtol() series, with regards to the
char **endp parameter (the way base is implemented now is exactly like
strtol) and the whitespace handler (whitespace is ignored at the beginning
at end, but once seen after digits, it terminates).

I think you should also make a mpz_set_wcs that takes a wchar_t * on
platforms that support wchar_t (in the case of Windows, Cygwin's libraries
don't, but Win32 does).  Can never hurt to be Unicode compatible.  I could
help with the processing of foreign digits if you like, but I doubt that
that's necessary.

-- Barubary

reply via email to

[Prev in Thread] Current Thread [Next in Thread]