Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 1 | /*********************************************************** |
| 2 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | The Netherlands. |
| 4 | |
| 5 | All Rights Reserved |
| 6 | |
| 7 | Permission to use, copy, modify, and distribute this software and its |
| 8 | documentation for any purpose and without fee is hereby granted, |
| 9 | provided that the above copyright notice appear in all copies and that |
| 10 | both that copyright notice and this permission notice appear in |
| 11 | supporting documentation, and that the names of Stichting Mathematisch |
| 12 | Centrum or CWI or Corporation for National Research Initiatives or |
| 13 | CNRI not be used in advertising or publicity pertaining to |
| 14 | distribution of the software without specific, written prior |
| 15 | permission. |
| 16 | |
| 17 | While CWI is the initial source for this software, a modified version |
| 18 | is made available by the Corporation for National Research Initiatives |
| 19 | (CNRI) at the Internet address ftp://ftp.python.org. |
| 20 | |
| 21 | STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 22 | REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 23 | MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 24 | CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 25 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 26 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 27 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 28 | PERFORMANCE OF THIS SOFTWARE. |
| 29 | |
| 30 | ******************************************************************/ |
| 31 | |
| 32 | /* Newfangled version identification scheme. |
| 33 | |
| 34 | This scheme was added in Python 1.5.2b2; before that time, only PATCHLEVEL |
| 35 | was available. To test for presence of the scheme, test for |
| 36 | defined(PY_MAJOR_VERSION). |
| 37 | |
| 38 | When the major or minor version changes, the VERSION variable in |
| 39 | configure.in must also be changed. |
| 40 | |
| 41 | There is also (independent) API version information in modsupport.h. |
| 42 | */ |
| 43 | |
| 44 | /* Values for PY_RELEASE_LEVEL */ |
| 45 | #define PY_RELEASE_LEVEL_ALPHA 0xA |
| 46 | #define PY_RELEASE_LEVEL_BETA 0xB |
Guido van Rossum | bd341fa | 1999-04-07 16:00:20 +0000 | [diff] [blame] | 47 | #define PY_RELEASE_LEVEL_GAMMA 0xC |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 48 | #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ |
Guido van Rossum | 9e47859 | 1999-04-13 14:47:26 +0000 | [diff] [blame] | 49 | /* Higher for patch releases */ |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 50 | |
| 51 | /* Version parsed out into numeric values */ |
| 52 | #define PY_MAJOR_VERSION 1 |
| 53 | #define PY_MINOR_VERSION 5 |
| 54 | #define PY_MICRO_VERSION 2 |
Guido van Rossum | 9e47859 | 1999-04-13 14:47:26 +0000 | [diff] [blame] | 55 | #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL |
| 56 | #define PY_RELEASE_SERIAL 0 |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 57 | |
| 58 | /* Version as a string */ |
Guido van Rossum | 8f3e150 | 1999-06-09 15:16:18 +0000 | [diff] [blame] | 59 | #define PY_VERSION "1.5.2+" |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 60 | |
| 61 | /* Historic */ |
Guido van Rossum | 8f3e150 | 1999-06-09 15:16:18 +0000 | [diff] [blame] | 62 | #define PATCHLEVEL "1.5.2+" |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 63 | |
| 64 | /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. |
| 65 | Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ |
| 66 | #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ |
| 67 | (PY_MINOR_VERSION << 16) | \ |
| 68 | (PY_MICRO_VERSION << 8) | \ |
| 69 | (PY_RELEASE_LEVEL << 4) | \ |
| 70 | (PY_RELEASE_SERIAL << 0)) |