summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-06-03 03:47:53 (GMT)
committerEli Bendersky <eliben@gmail.com>2012-06-03 03:47:53 (GMT)
commit11cfea92950eda064e9b5b7048c1951bb084fc43 (patch)
tree5c7f99b6622c8ccbd067f5147f6e71b29296fe7e /Doc
parentc68e1368b52eb3b6b192593b988e882579827694 (diff)
downloadcpython-11cfea92950eda064e9b5b7048c1951bb084fc43.zip
cpython-11cfea92950eda064e9b5b7048c1951bb084fc43.tar.gz
cpython-11cfea92950eda064e9b5b7048c1951bb084fc43.tar.bz2
Issue #14424: Document PyType_GenericAlloc, and fix the documentation of PyType_GenericNew
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/type.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst
index cfd0d78..ce39e4d 100644
--- a/Doc/c-api/type.rst
+++ b/Doc/c-api/type.rst
@@ -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)