Chris@87: Chris@87: /* Newfangled version identification scheme. Chris@87: Chris@87: This scheme was added in Python 1.5.2b2; before that time, only PATCHLEVEL Chris@87: was available. To test for presence of the scheme, test for Chris@87: defined(PY_MAJOR_VERSION). Chris@87: Chris@87: When the major or minor version changes, the VERSION variable in Chris@87: configure.ac must also be changed. Chris@87: Chris@87: There is also (independent) API version information in modsupport.h. Chris@87: */ Chris@87: Chris@87: /* Values for PY_RELEASE_LEVEL */ Chris@87: #define PY_RELEASE_LEVEL_ALPHA 0xA Chris@87: #define PY_RELEASE_LEVEL_BETA 0xB Chris@87: #define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ Chris@87: #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ Chris@87: /* Higher for patch releases */ Chris@87: Chris@87: /* Version parsed out into numeric values */ Chris@87: /*--start constants--*/ Chris@87: #define PY_MAJOR_VERSION 2 Chris@87: #define PY_MINOR_VERSION 7 Chris@87: #define PY_MICRO_VERSION 9 Chris@87: #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL Chris@87: #define PY_RELEASE_SERIAL 0 Chris@87: Chris@87: /* Version as a string */ Chris@87: #define PY_VERSION "2.7.9+" Chris@87: /*--end constants--*/ Chris@87: Chris@87: /* Subversion Revision number of this file (not of the repository). Empty Chris@87: since Mercurial migration. */ Chris@87: #define PY_PATCHLEVEL_REVISION "" Chris@87: Chris@87: /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Chris@87: Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ Chris@87: #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ Chris@87: (PY_MINOR_VERSION << 16) | \ Chris@87: (PY_MICRO_VERSION << 8) | \ Chris@87: (PY_RELEASE_LEVEL << 4) | \ Chris@87: (PY_RELEASE_SERIAL << 0))