blob: 041c9f7c307a29fd48818692cb8bc66f458deb9a [file] [log] [blame]
Christian Heimesf78b1c62007-12-02 16:52:32 +00001/* Integer object interface
Guido van Rossumf70e43a1991-02-19 12:39:46 +00002
Christian Heimesf78b1c62007-12-02 16:52:32 +00003 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 Rossum85a5fbb1990-10-14 12:07:46 +00007
Fred Drakeea9cb5a2000-07-09 00:20:36 +00008#ifndef Py_INTOBJECT_H
9#define Py_INTOBJECT_H
10#ifdef __cplusplus
11extern "C" {
12#endif
13
Amaury Forgeot d'Arcbcbfa642008-10-07 21:27:43 +000014#if defined(__GNUC__)
Christian Heimesf78b1c62007-12-02 16:52:32 +000015#warning "DeprecationWarning: intobject.h is going to be removed in 3.1"
Amaury Forgeot d'Arcbcbfa642008-10-07 21:27:43 +000016#elif defined(MS_WINDOWS)
17#pragma message("DeprecationWarning: intobject.h is going to be removed in 3.1")
18#endif
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000019
Christian Heimesf78b1c62007-12-02 16:52:32 +000020#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 Rossumcc34faa1998-12-10 16:54:17 +000031
Guido van Rossuma3309961993-07-28 09:05:47 +000032#ifdef __cplusplus
33}
34#endif
35#endif /* !Py_INTOBJECT_H */