diff options
author | Stefan Krah <skrah@bytereef.org> | 2013-11-24 18:44:57 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2013-11-24 18:44:57 (GMT) |
commit | 45059eb1d0788aa74ea383c89cf2f8c7a32fd2aa (patch) | |
tree | b3b6d49eaf9541e9c53b0eef260f53e6607b69f0 /Modules/_decimal/_decimal.c | |
parent | cdac302af362f275f31c13e143f78ec682ef7b68 (diff) | |
download | cpython-45059eb1d0788aa74ea383c89cf2f8c7a32fd2aa.zip cpython-45059eb1d0788aa74ea383c89cf2f8c7a32fd2aa.tar.gz cpython-45059eb1d0788aa74ea383c89cf2f8c7a32fd2aa.tar.bz2 |
1) Prepare libmpdec for the 2.4.0 release. None of the following changes affects
_decimal:
o Make all "mpd_t to C integer" conversion functions available in both the
64-bit and the 32-bit versions.
o Make all mixed mpd_t/C integer arithmetic functions available in the
32-bit version.
o Better handling of __STDC_LIMIT_MACROS for C++ users.
o Add struct tags (at the request of C++ users).
2) Check for libmpdec.so.2 if --with-system-libmpdec is used.
Diffstat (limited to 'Modules/_decimal/_decimal.c')
-rw-r--r-- | Modules/_decimal/_decimal.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 06c2c39..ac20308 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -39,6 +39,11 @@ #include "memory.h" +#if MPD_MAJOR_VERSION != 2 + #error "libmpdec major version 2 required" +#endif + + /* * Type sizes with assertions in mpdecimal.h and pyport.h: * sizeof(size_t) == sizeof(Py_ssize_t) @@ -5730,7 +5735,8 @@ PyInit__decimal(void) } /* Add specification version number */ - CHECK_INT(PyModule_AddStringConstant(m, "__version__", " 1.70")); + CHECK_INT(PyModule_AddStringConstant(m, "__version__", "1.70")); + CHECK_INT(PyModule_AddStringConstant(m, "__libmpdec_version__", mpd_version())); return m; |