Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.5
Changeset: r88366:ab3f12749042
Date: 2016-11-13 19:24 +0100
http://bitbucket.org/pypy/pypy/changeset/ab3f12749042/
Log: Refresh libmpdec source code from CPython 3.5.1
diff --git a/lib_pypy/_libmpdec/io.c b/lib_pypy/_libmpdec/io.c
--- a/lib_pypy/_libmpdec/io.c
+++ b/lib_pypy/_libmpdec/io.c
@@ -446,7 +446,7 @@
if (mpd_isspecial(dec)) {
- mem = sizeof "-Infinity";
+ mem = sizeof "-Infinity%";
if (mpd_isnan(dec) && dec->len > 0) {
/* diagnostic code */
mem += dec->digits;
@@ -609,10 +609,10 @@
*cp++ = (flags&MPD_FMT_UPPER) ? 'E' : 'e';
cp = exp_to_string(cp, ldigits-dplace);
}
+ }
- if (flags&MPD_FMT_PERCENT) {
- *cp++ = '%';
- }
+ if (flags&MPD_FMT_PERCENT) {
+ *cp++ = '%';
}
assert(cp < decstring+mem);
@@ -1260,6 +1260,9 @@
stackspec.align = '>';
spec = &stackspec;
}
+ if (type == '%') {
+ flags |= MPD_FMT_PERCENT;
+ }
}
else {
uint32_t workstatus = 0;
diff --git a/lib_pypy/_libmpdec/mpdecimal.c b/lib_pypy/_libmpdec/mpdecimal.c
--- a/lib_pypy/_libmpdec/mpdecimal.c
+++ b/lib_pypy/_libmpdec/mpdecimal.c
@@ -43,6 +43,7 @@
#ifdef PPRO
#if defined(_MSC_VER)
#include <float.h>
+ #pragma float_control(precise, on)
#pragma fenv_access(on)
#elif !defined(__OpenBSD__) && !defined(__NetBSD__)
/* C99 */
diff --git a/lib_pypy/_libmpdec/mpdecimal.h b/lib_pypy/_libmpdec/mpdecimal.h
--- a/lib_pypy/_libmpdec/mpdecimal.h
+++ b/lib_pypy/_libmpdec/mpdecimal.h
@@ -108,9 +108,13 @@
#define MPD_MAJOR_VERSION 2
#define MPD_MINOR_VERSION 4
-#define MPD_MICRO_VERSION 0
+#define MPD_MICRO_VERSION 1
-#define MPD_VERSION "2.4.0"
+#define MPD_VERSION "2.4.1"
+
+#define MPD_VERSION_HEX ((MPD_MAJOR_VERSION << 24) | \
+ (MPD_MINOR_VERSION << 16) | \
+ (MPD_MICRO_VERSION << 8))
const char *mpd_version(void);
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit