Christian Heimes | f78b1c6 | 2007-12-02 16:52:32 +0000 | [diff] [blame] | 1 | /* Integer object interface |
Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 2 | |
Christian Heimes | f78b1c6 | 2007-12-02 16:52:32 +0000 | [diff] [blame] | 3 | This header files exists to make porting code to Python 3.0 easier. It |
| 4 | defines aliases from PyInt_* to PyLong_*. Only PyInt_GetMax() and |
| 5 | PyInt_CheckExact() remain in longobject.h. |
| 6 | */ |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 7 | |
Fred Drake | ea9cb5a | 2000-07-09 00:20:36 +0000 | [diff] [blame] | 8 | #ifndef Py_INTOBJECT_H |
| 9 | #define Py_INTOBJECT_H |
| 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
Amaury Forgeot d'Arc | bcbfa64 | 2008-10-07 21:27:43 +0000 | [diff] [blame] | 14 | #if defined(__GNUC__) |
Christian Heimes | f78b1c6 | 2007-12-02 16:52:32 +0000 | [diff] [blame] | 15 | #warning "DeprecationWarning: intobject.h is going to be removed in 3.1" |
Amaury Forgeot d'Arc | bcbfa64 | 2008-10-07 21:27:43 +0000 | [diff] [blame] | 16 | #elif defined(MS_WINDOWS) |
| 17 | #pragma message("DeprecationWarning: intobject.h is going to be removed in 3.1") |
| 18 | #endif |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 19 | |
Christian Heimes | f78b1c6 | 2007-12-02 16:52:32 +0000 | [diff] [blame] | 20 | #define PyInt_Check(op) PyLong_Check(op) |
| 21 | #define PyInt_FromString PyLong_FromString |
| 22 | #define PyInt_FromUnicode PyLong_FromUnicode |
| 23 | #define PyInt_FromLong PyLong_FromLong |
| 24 | #define PyInt_FromSize_t PyLong_FromSize_t |
| 25 | #define PyInt_FromSsize_t PyLong_FromSsize_t |
| 26 | #define PyInt_AsLong PyLong_AsLong |
| 27 | #define PyInt_AsSsize_t PyLong_AsSsize_t |
| 28 | #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask |
| 29 | #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask |
| 30 | #define PyInt_AS_LONG PyLong_AS_LONG |
Guido van Rossum | cc34faa | 1998-12-10 16:54:17 +0000 | [diff] [blame] | 31 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 32 | #ifdef __cplusplus |
| 33 | } |
| 34 | #endif |
| 35 | #endif /* !Py_INTOBJECT_H */ |