[Python-checkins] r63594 - in python/branches/okkoto-sizeof/Doc: c-api/object.rst c-api/typeobj.rst includes/typestruct.h library/functions.rst library/sys.rst
robert.schuppenies
python-checkins at python.org
Sat May 24 22:06:23 CEST 2008
Author: robert.schuppenies
Date: Sat May 24 22:06:22 2008
New Revision: 63594
Log:
clean up of documentation. removed old footprint notes, added new getsizeof
Modified:
python/branches/okkoto-sizeof/Doc/c-api/object.rst
python/branches/okkoto-sizeof/Doc/c-api/typeobj.rst
python/branches/okkoto-sizeof/Doc/includes/typestruct.h
python/branches/okkoto-sizeof/Doc/library/functions.rst
python/branches/okkoto-sizeof/Doc/library/sys.rst
Modified: python/branches/okkoto-sizeof/Doc/c-api/object.rst
==============================================================================
--- python/branches/okkoto-sizeof/Doc/c-api/object.rst (original)
+++ python/branches/okkoto-sizeof/Doc/c-api/object.rst Sat May 24 22:06:22 2008
@@ -304,13 +304,6 @@
.. versionadded:: 2.2
-.. cfunction:: int PyObject_Footprint(PyObject *o)
-
- Return the memory footprint (i.e. size in bytes) of object o or NULL on failure.
-
- .. versionadded:: 2.6
-
-
.. cfunction:: Py_ssize_t PyObject_Length(PyObject *o)
Py_ssize_t PyObject_Size(PyObject *o)
Modified: python/branches/okkoto-sizeof/Doc/c-api/typeobj.rst
==============================================================================
--- python/branches/okkoto-sizeof/Doc/c-api/typeobj.rst (original)
+++ python/branches/okkoto-sizeof/Doc/c-api/typeobj.rst Sat May 24 22:06:22 2008
@@ -1092,21 +1092,6 @@
Weak reference list head, for weak references to this type object. Not
inherited. Internal use only.
-
-.. cmember:: footprintfunc PyTypeObject.tp_footprint
-
- An optional function pointer that returns the memory footprint of the
- object. This function should be used if the memory usage of the object
- cannot be determined with tp_basicsize plus, if applicable,
- tp_itemsize * length of the object. If the field is not set, the memory
- footprint is computed as described. Note that this formula does not
- include any referenced objects, e.g. attributes.
-
- The value -1 should not be returned as a normal return value; when an
- error occurs during the computation of the hash value, the function
- should set an exception and return -1.
-
-
The remaining fields are only defined if the feature test macro
:const:`COUNT_ALLOCS` is defined, and are for internal use only. They are
documented here for completeness. None of these fields are inherited by
Modified: python/branches/okkoto-sizeof/Doc/includes/typestruct.h
==============================================================================
--- python/branches/okkoto-sizeof/Doc/includes/typestruct.h (original)
+++ python/branches/okkoto-sizeof/Doc/includes/typestruct.h Sat May 24 22:06:22 2008
@@ -72,12 +72,5 @@
PyObject *tp_cache;
PyObject *tp_subclasses;
PyObject *tp_weaklist;
- destructor tp_del;
-
- /* Type attribute cache version tag. Added in version 2.6 */
- unsigned int tp_version_tag;
-
- /* Memory usage. Added in version 2.6 */
- footprintfunc tp_footprint;
} PyTypeObject;
Modified: python/branches/okkoto-sizeof/Doc/library/functions.rst
==============================================================================
--- python/branches/okkoto-sizeof/Doc/library/functions.rst (original)
+++ python/branches/okkoto-sizeof/Doc/library/functions.rst Sat May 24 22:06:22 2008
@@ -472,16 +472,6 @@
The float type is described in :ref:`typesnumeric`.
-
-.. function:: footprint(x)
-
- Return the size of an object in bytes. The object can be any type of
- object. All built-in objects will return correct results, but this
- must not hold true for third-party extensions.
-
- .. versionadded:: 2.6
-
-
.. function:: frozenset([iterable])
:noindex:
Modified: python/branches/okkoto-sizeof/Doc/library/sys.rst
==============================================================================
--- python/branches/okkoto-sizeof/Doc/library/sys.rst (original)
+++ python/branches/okkoto-sizeof/Doc/library/sys.rst Sat May 24 22:06:22 2008
@@ -409,6 +409,16 @@
:func:`setrecursionlimit`.
+.. function:: getsizeof(object)
+
+ Return the size of an object in bytes. The object can be any type of
+ object. All built-in objects will return correct results, but this
+ must not hold true for third-party extensions as it is implementation
+ specific.
+
+ .. versionadded:: 2.6
+
+
.. function:: _getframe([depth])
Return a frame object from the call stack. If optional integer *depth* is
More information about the Python-checkins
mailing list