[Python-checkins] r69518 - in python/branches/release30-maint: Doc/c-api/number.rst Include/abstract.h Include/intobject.h

mark.dickinson python-checkins at python.org
Wed Feb 11 18:05:35 CET 2009


Author: mark.dickinson
Date: Wed Feb 11 18:05:35 2009
New Revision: 69518

Log:
Merged revisions 69517 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69517 | mark.dickinson | 2009-02-11 17:04:37 +0000 (Wed, 11 Feb 2009) | 2 lines
  
  Issue #4910:  PyNumber_Int is deprecated in 3.0.1; will be removed in 3.1.
........


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/Include/intobject.h

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	Wed Feb 11 18:05:35 2009
@@ -233,6 +233,12 @@
    Returns the *o* converted to an integer object on success, or *NULL* on
    failure.  This is the equivalent of the Python expression ``int(o)``.
 
+   .. note::
+
+     This function is defined in the transitional :file:`intobject.h`
+     header file.  It will be removed completely in Python 3.1.  Use
+     the :cfunc:`PyNumber_Long` function instead.
+
 
 .. cfunction:: PyObject* PyNumber_Long(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	Wed Feb 11 18:05:35 2009
@@ -783,7 +783,11 @@
         is cleared and the value is clipped. 
        */
 
-     #define PyNumber_Int PyNumber_Long
+       /*
+         PyNumber_Int used to be found here.  It's now in Include/intobject.h,
+         where it is defined to be an alias for PyNumber_Long.  New code
+         should use PyNumber_Long instead.
+       */
 
      PyAPI_FUNC(PyObject *) PyNumber_Long(PyObject *o);
 

Modified: python/branches/release30-maint/Include/intobject.h
==============================================================================
--- python/branches/release30-maint/Include/intobject.h	(original)
+++ python/branches/release30-maint/Include/intobject.h	Wed Feb 11 18:05:35 2009
@@ -1,8 +1,8 @@
 /* Integer object interface
 
-   This header files exists to make porting code to Python 3.0 easier. It
-   defines aliases from PyInt_* to PyLong_*. Only PyInt_GetMax() and
-   PyInt_CheckExact() remain in longobject.h.
+   This header file exists to make porting code to Python 3.0 easier. It
+   defines aliases from PyInt_* to PyLong_* and an alias from
+   PyNumber_Int to PyNumber_Long.
  */
 
 #ifndef Py_INTOBJECT_H
@@ -28,6 +28,7 @@
 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
 #define PyInt_AS_LONG PyLong_AS_LONG
+#define PyNumber_Int PyNumber_Long
 
 #ifdef __cplusplus
 }


More information about the Python-checkins mailing list