]> granicus.if.org Git - python/commitdiff
Introduce and check for MPD_VERSION_HEX for precise management of builds
authorStefan Krah <skrah@bytereef.org>
Tue, 26 Aug 2014 19:31:47 +0000 (21:31 +0200)
committerStefan Krah <skrah@bytereef.org>
Tue, 26 Aug 2014 19:31:47 +0000 (21:31 +0200)
with an external libmpdec.

Lib/decimal.py
Modules/_decimal/_decimal.c
Modules/_decimal/libmpdec/mpdecimal.h

index e11f1a0082ccfd0a714e06c1a5da276bbae4c425..5544f4e34adff1dd19b16b569f3d0c4919159327 100644 (file)
@@ -140,7 +140,7 @@ __all__ = [
 
 __version__ = '1.70'    # Highest version of the spec this complies with
                         # See http://speleotrove.com/decimal/
-__libmpdec_version__ = "2.4.0" # compatible libmpdec version
+__libmpdec_version__ = "2.4.1" # compatible libmpdec version
 
 import math as _math
 import numbers as _numbers
index 8be9be648961e073bc1d70915657b961adf031ec..f00088736e65dc89bd38b6221cce5911d76e3ebf 100644 (file)
@@ -39,8 +39,8 @@
 #include "memory.h"
 
 
-#if MPD_MAJOR_VERSION != 2
-  #error "libmpdec major version 2 required"
+#if !defined(MPD_VERSION_HEX) || MPD_VERSION_HEX < 0x02040100
+  #error "libmpdec version >= 2.4.1 required"
 #endif
 
 
index b43231c4b8a00a2c418dde8ba3c89a13876a3525..5ca74135bf9b3bbd8982c541b7a0354216fef9ef 100644 (file)
@@ -108,9 +108,13 @@ MPD_PRAGMA(MPD_HIDE_SYMBOLS_START)
 
 #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);