]> granicus.if.org Git - python/commitdiff
Issue #14424: Document PyType_GenericAlloc, and fix the documentation of PyType_Gener...
authorEli Bendersky <eliben@gmail.com>
Sun, 3 Jun 2012 03:47:53 +0000 (06:47 +0300)
committerEli Bendersky <eliben@gmail.com>
Sun, 3 Jun 2012 03:47:53 +0000 (06:47 +0300)
Doc/c-api/type.rst

index cfd0d78809062801eec78feb47219102bd08ca09..ce39e4dbac79aa982c4f39c172c88179bdb9f3e3 100644 (file)
@@ -70,13 +70,14 @@ Type Objects
 
 .. c:function:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
 
-   XXX: Document.
-
+   Generic handler for the :attr:`tp_alloc` slot of a type object.  Use
+   Python's default memory allocation mechanism to allocate a new instance and
+   initialize all its contents to *NULL*.
 
 .. c:function:: PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
 
-   Generic handler for the :attr:`tp_new` slot of a type object.  Initialize
-   all instance variables to *NULL*.
+   Generic handler for the :attr:`tp_new` slot of a type object.  Create a
+   new instance using the type's :attr:`tp_alloc` slot.
 
 .. c:function:: int PyType_Ready(PyTypeObject *type)