File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,6 +233,12 @@ Number Protocol
233233 Returns the *o * converted to an integer object on success, or *NULL * on
234234 failure. This is the equivalent of the Python expression ``int(o) ``.
235235
236+ .. note ::
237+
238+ This function is defined in the transitional :file: `intobject.h `
239+ header file. It will be removed completely in Python 3.1. Use
240+ the :cfunc: `PyNumber_Long ` function instead.
241+
236242
237243.. cfunction :: PyObject* PyNumber_Long(PyObject *o)
238244
Original file line number Diff line number Diff line change @@ -783,7 +783,11 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
783783 is cleared and the value is clipped.
784784 */
785785
786- #define PyNumber_Int PyNumber_Long
786+ /*
787+ PyNumber_Int used to be found here. It's now in Include/intobject.h,
788+ where it is defined to be an alias for PyNumber_Long. New code
789+ should use PyNumber_Long instead.
790+ */
787791
788792 PyAPI_FUNC (PyObject * ) PyNumber_Long (PyObject * o );
789793
Original file line number Diff line number Diff line change 11/* Integer object interface
22
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 .
3+ This header file exists to make porting code to Python 3.0 easier. It
4+ defines aliases from PyInt_* to PyLong_* and an alias from
5+ PyNumber_Int to PyNumber_Long .
66 */
77
88#ifndef Py_INTOBJECT_H
@@ -28,6 +28,7 @@ extern "C" {
2828#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
2929#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
3030#define PyInt_AS_LONG PyLong_AS_LONG
31+ #define PyNumber_Int PyNumber_Long
3132
3233#ifdef __cplusplus
3334}
You can’t perform that action at this time.
0 commit comments