[Python-checkins] r66039 - in python/trunk: Doc/c-api/object.rst Include/object.h Misc/NEWS

benjamin.peterson python-checkins at python.org
Tue Aug 26 19:08:41 CEST 2008


Author: benjamin.peterson
Date: Tue Aug 26 19:08:40 2008
New Revision: 66039

Log:
sort of backport 66038 by aliasing PyObject_Bytes to PyObject_Str

Modified:
   python/trunk/Doc/c-api/object.rst
   python/trunk/Include/object.h
   python/trunk/Misc/NEWS

Modified: python/trunk/Doc/c-api/object.rst
==============================================================================
--- python/trunk/Doc/c-api/object.rst	(original)
+++ python/trunk/Doc/c-api/object.rst	Tue Aug 26 19:08:40 2008
@@ -130,6 +130,14 @@
    by the :keyword:`print` statement.
 
 
+.. cfunction:: PyObject* PyObject_Bytes(PyObject *o)
+
+   .. index:: builtin: bytes
+
+   Compute a bytes representation of object *o*.  In 2.x, this is just a alias
+   for :cfunc:`PyObject_Str`.
+
+
 .. cfunction:: PyObject* PyObject_Unicode(PyObject *o)
 
    .. index:: builtin: unicode

Modified: python/trunk/Include/object.h
==============================================================================
--- python/trunk/Include/object.h	(original)
+++ python/trunk/Include/object.h	Tue Aug 26 19:08:40 2008
@@ -458,6 +458,7 @@
 PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
 PyAPI_FUNC(PyObject *) _PyObject_Str(PyObject *);
 PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
+#define PyObject_Bytes PyObject_Str
 #ifdef Py_USING_UNICODE
 PyAPI_FUNC(PyObject *) PyObject_Unicode(PyObject *);
 #endif

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Tue Aug 26 19:08:40 2008
@@ -29,6 +29,11 @@
 - Added warnings on the use of ``__getslice__``, ``__setslice__``, or
   ``__delslice__``.
 
+C-API
+-----
+
+- Aliased PyObject_Bytes to PyObject_Str.
+
 Library
 -------
 


More information about the Python-checkins mailing list