[Gmp-commit] /var/hg/gmp: Use GMP_DECIMAL_POINT more consistently.

mercurial at gmplib.org mercurial at gmplib.org
Fri Jun 28 21:09:43 CEST 2013


details:   /var/hg/gmp/rev/f15b292c622e
changeset: 15841:f15b292c622e
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Fri Jun 28 21:09:37 2013 +0200
description:
Use GMP_DECIMAL_POINT more consistently.

diffstat:

 ChangeLog             |  6 ++++++
 cxx/ismpf.cc          |  2 +-
 cxx/osmpf.cc          |  2 +-
 tests/cxx/t-locale.cc |  4 ++--
 4 files changed, 10 insertions(+), 4 deletions(-)

diffs (58 lines):

diff -r 53d1f20e8169 -r f15b292c622e ChangeLog
--- a/ChangeLog	Wed Jun 19 17:25:56 2013 +0200
+++ b/ChangeLog	Fri Jun 28 21:09:37 2013 +0200
@@ -1,3 +1,9 @@
+2013-06-28  Marc Glisse  <marc.glisse at inria.fr>
+
+	* cxx/ismpf.cc: Use GMP_DECIMAL_POINT.
+	* cxx/osmpf.cc: Likewise.
+	* tests/cxx/t-locale.cc: Likewise.
+
 2013-06-19  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/powerpc64/p6/lshift.asm: Rewrite switching-into-loop code.
diff -r 53d1f20e8169 -r f15b292c622e cxx/ismpf.cc
--- a/cxx/ismpf.cc	Wed Jun 19 17:25:56 2013 +0200
+++ b/cxx/ismpf.cc	Fri Jun 28 21:09:37 2013 +0200
@@ -45,7 +45,7 @@
   bool ok = false;
 
   // C decimal point, as expected by mpf_set_str
-  const char *lconv_point = localeconv()->decimal_point;
+  const char *lconv_point = GMP_DECIMAL_POINT;
 
   // C++ decimal point
 #if HAVE_STD__LOCALE
diff -r 53d1f20e8169 -r f15b292c622e cxx/osmpf.cc
--- a/cxx/osmpf.cc	Wed Jun 19 17:25:56 2013 +0200
+++ b/cxx/osmpf.cc	Fri Jun 28 21:09:37 2013 +0200
@@ -47,7 +47,7 @@
   point[0] = use_facet< numpunct<char> >(o.getloc()).decimal_point();
   point[1] = '\0';
 #else
-  const char *point = localeconv()->decimal_point;
+  const char *point = GMP_DECIMAL_POINT;
 #endif
 
   GMP_ASPRINTF_T_INIT (d, &result);
diff -r 53d1f20e8169 -r f15b292c622e tests/cxx/t-locale.cc
--- a/tests/cxx/t-locale.cc	Wed Jun 19 17:25:56 2013 +0200
+++ b/tests/cxx/t-locale.cc	Fri Jun 28 21:09:37 2013 +0200
@@ -105,7 +105,7 @@
                   cout << "  point " << point[i] << "\n";
                   cout << "  str   \"" << str << "\"\n";
                   cout << "  localeconv point \""
-                       << localeconv()->decimal_point << "\"\n";
+                       << GMP_DECIMAL_POINT << "\"\n";
                   abort ();
                 }
 
@@ -120,7 +120,7 @@
                   cout << "  got   " << got << "\n";
                   cout << "  want  " << want << "\n";
                   cout << "  localeconv point \""
-                       << localeconv()->decimal_point << "\"\n";
+                       << GMP_DECIMAL_POINT << "\"\n";
                   abort ();
                 }
             }


More information about the gmp-commit mailing list