[Python-checkins] r68509 - in python/branches/release30-maint: Doc/c-api/number.rst Include/abstract.h Objects/typeobject.c
mark.dickinson
python-checkins at python.org
Sat Jan 10 23:18:36 CET 2009
Author: mark.dickinson
Date: Sat Jan 10 23:18:36 2009
New Revision: 68509
Log:
Merged revisions 68508 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r68508 | mark.dickinson | 2009-01-10 22:14:33 +0000 (Sat, 10 Jan 2009) | 3 lines
Issue #4910: replace "long" with "int" in docstring for __long__ slot and
in documentation for PyNumber_Long.
........
Modified:
python/branches/release30-maint/ (props changed)
python/branches/release30-maint/Doc/c-api/number.rst
python/branches/release30-maint/Include/abstract.h
python/branches/release30-maint/Objects/typeobject.c
Modified: python/branches/release30-maint/Doc/c-api/number.rst
==============================================================================
--- python/branches/release30-maint/Doc/c-api/number.rst (original)
+++ python/branches/release30-maint/Doc/c-api/number.rst Sat Jan 10 23:18:36 2009
@@ -230,19 +230,16 @@
.. cfunction:: PyObject* PyNumber_Int(PyObject *o)
- .. index:: builtin: int
-
- Returns the *o* converted to an integer object on success, or *NULL* on failure.
- If the argument is outside the integer range a long object will be returned
- instead. This is the equivalent of the Python expression ``int(o)``.
+ Returns the *o* converted to an integer object on success, or *NULL* on
+ failure. This is the equivalent of the Python expression ``int(o)``.
.. cfunction:: PyObject* PyNumber_Long(PyObject *o)
- .. index:: builtin: long
+ .. index:: builtin: int
Returns the *o* converted to an integer object on success, or *NULL* on
- failure. This is the equivalent of the Python expression ``long(o)``.
+ failure. This is the equivalent of the Python expression ``int(o)``.
.. cfunction:: PyObject* PyNumber_Float(PyObject *o)
Modified: python/branches/release30-maint/Include/abstract.h
==============================================================================
--- python/branches/release30-maint/Include/abstract.h (original)
+++ python/branches/release30-maint/Include/abstract.h Sat Jan 10 23:18:36 2009
@@ -808,20 +808,14 @@
#define PyNumber_Int PyNumber_Long
+ PyAPI_FUNC(PyObject *) PyNumber_Long(PyObject *o);
+
/*
Returns the o converted to an integer object on success, or
NULL on failure. This is the equivalent of the Python
expression: int(o).
*/
- PyAPI_FUNC(PyObject *) PyNumber_Long(PyObject *o);
-
- /*
- Returns the o converted to a long integer object on success,
- or NULL on failure. This is the equivalent of the Python
- expression: long(o).
- */
-
PyAPI_FUNC(PyObject *) PyNumber_Float(PyObject *o);
/*
Modified: python/branches/release30-maint/Objects/typeobject.c
==============================================================================
--- python/branches/release30-maint/Objects/typeobject.c (original)
+++ python/branches/release30-maint/Objects/typeobject.c Sat Jan 10 23:18:36 2009
@@ -5444,7 +5444,7 @@
UNSLOT("__int__", nb_int, slot_nb_int, wrap_unaryfunc,
"int(x)"),
UNSLOT("__long__", nb_long, slot_nb_long, wrap_unaryfunc,
- "long(x)"),
+ "int(x)"),
UNSLOT("__float__", nb_float, slot_nb_float, wrap_unaryfunc,
"float(x)"),
NBSLOT("__index__", nb_index, slot_nb_index, wrap_unaryfunc,
More information about the Python-checkins
mailing list