Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf26115

Browse files
author
Stefan Krah
committed
Introduce and check for MPD_VERSION_HEX for precise management of builds
with an external libmpdec.
1 parent 298131a commit cf26115

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

Lib/decimal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140

141141
__version__ = '1.70' # Highest version of the spec this complies with
142142
# See http://speleotrove.com/decimal/
143-
__libmpdec_version__ = "2.4.0" # compatible libmpdec version
143+
__libmpdec_version__ = "2.4.1" # compatible libmpdec version
144144

145145
import math as _math
146146
import numbers as _numbers

Modules/_decimal/_decimal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
#include "memory.h"
4040

4141

42-
#if MPD_MAJOR_VERSION != 2
43-
#error "libmpdec major version 2 required"
42+
#if !defined(MPD_VERSION_HEX) || MPD_VERSION_HEX < 0x02040100
43+
#error "libmpdec version >= 2.4.1 required"
4444
#endif
4545

4646

Modules/_decimal/libmpdec/mpdecimal.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,13 @@ MPD_PRAGMA(MPD_HIDE_SYMBOLS_START)
108108

109109
#define MPD_MAJOR_VERSION 2
110110
#define MPD_MINOR_VERSION 4
111-
#define MPD_MICRO_VERSION 0
111+
#define MPD_MICRO_VERSION 1
112112

113-
#define MPD_VERSION "2.4.0"
113+
#define MPD_VERSION "2.4.1"
114+
115+
#define MPD_VERSION_HEX ((MPD_MAJOR_VERSION << 24) | \
116+
(MPD_MINOR_VERSION << 16) | \
117+
(MPD_MICRO_VERSION << 8))
114118

115119
const char *mpd_version(void);
116120

0 commit comments

Comments
 (0)