I've moved the remains of PyInt_ to the longobject.h header file and removed the inclusing of intobject.h from Python.h. Now the intobject.h exists only to provide some aliases for porters from Python 2.x.

This commit is contained in:
Christian Heimes 2007-12-02 16:52:32 +00:00
parent 2137b6aa99
commit f78b1c6573
6 changed files with 34 additions and 47 deletions

View file

@ -14,6 +14,7 @@ PyAPI_DATA(PyTypeObject) PyLong_Type;
#define PyLong_Check(op) \
PyType_FastSubclass(Py_Type(op), Py_TPFLAGS_LONG_SUBCLASS)
#define PyLong_CheckExact(op) (Py_Type(op) == &PyLong_Type)
#define PyInt_CheckExact(op) (PyLong_CheckExact(op) && _PyLong_FitsInLong(op))
PyAPI_FUNC(PyObject *) PyLong_FromLong(long);
PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long);
@ -30,6 +31,8 @@ PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
cleanup to keep the extra information. [CH] */
#define PyLong_AS_LONG(op) PyLong_AsLong(op)
PyAPI_FUNC(long) PyInt_GetMax(void);
/* Used by socketmodule.c */
#if SIZEOF_SOCKET_T <= SIZEOF_LONG
#define PyLong_FromSocket_t(fd) PyLong_FromLong((SOCKET_T)(fd))
@ -127,6 +130,12 @@ PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
appending a base prefix of 0[box] if base is 2, 8 or 16. */
PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base);
/* These aren't really part of the long object, but they're handy. The
functions are in Python/mystrtoul.c.
*/
PyAPI_FUNC(unsigned long) PyOS_strtoul(char *, char **, int);
PyAPI_FUNC(long) PyOS_strtol(char *, char **, int);
#ifdef __cplusplus
}
#endif