blob: 58a79fef7fddd8c931ee41c12514d7ff38993188 [file] [log] [blame]
Guido van Rossumf1176c41999-01-03 12:40:24 +00001
Guido van Rossum45aecf42006-03-15 04:58:47 +00002/* Python version identification scheme.
Guido van Rossumf1176c41999-01-03 12:40:24 +00003
4 When the major or minor version changes, the VERSION variable in
5 configure.in must also be changed.
6
7 There is also (independent) API version information in modsupport.h.
8*/
9
10/* Values for PY_RELEASE_LEVEL */
11#define PY_RELEASE_LEVEL_ALPHA 0xA
12#define PY_RELEASE_LEVEL_BETA 0xB
Anthony Baxter49d42132004-11-15 15:03:25 +000013#define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */
Guido van Rossumf1176c41999-01-03 12:40:24 +000014#define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */
Guido van Rossum9e478591999-04-13 14:47:26 +000015 /* Higher for patch releases */
Guido van Rossumf1176c41999-01-03 12:40:24 +000016
17/* Version parsed out into numeric values */
Barry Warsawbb5cd082008-04-02 23:33:27 +000018/*--start constants--*/
Neal Norwitzade612b2006-03-17 08:27:50 +000019#define PY_MAJOR_VERSION 3
Barry Warsaw97f005d2008-12-03 16:46:14 +000020#define PY_MINOR_VERSION 1
Benjamin Peterson58891292010-11-13 17:28:56 +000021#define PY_MICRO_VERSION 3
Benjamin Peterson57574292010-11-27 14:46:13 +000022#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
23#define PY_RELEASE_SERIAL 0
Guido van Rossumf1176c41999-01-03 12:40:24 +000024
25/* Version as a string */
Benjamin Peterson68eb3712010-11-28 04:50:12 +000026#define PY_VERSION "3.1.3+"
Barry Warsawbb5cd082008-04-02 23:33:27 +000027/*--end constants--*/
Guido van Rossumf1176c41999-01-03 12:40:24 +000028
Benjamin Petersonec4b44b2011-03-15 15:03:13 -050029/* Subversion Revision number of this file (not of the repository). Empty
30 since Mercurial migration. */
31#define PY_PATCHLEVEL_REVISION ""
Martin v. Löwis43b57802006-01-05 23:38:54 +000032
Guido van Rossumf1176c41999-01-03 12:40:24 +000033/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
34 Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */
35#define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \
36 (PY_MINOR_VERSION << 16) | \
37 (PY_MICRO_VERSION << 8) | \
38 (PY_RELEASE_LEVEL << 4) | \
39 (PY_RELEASE_SERIAL << 0))