classification
Title: C-API documentation ignores heap types and says type objects must never be deallocated
Type: behavior Stage:
Components: Documentation Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, koubaa
Priority: normal Keywords:

Created on 2020-09-15 03:15 by koubaa, last changed 2020-09-15 16:51 by ammar2.

Pull Requests
URL Status Linked Edit
PR 22242 open koubaa, 2020-09-15 03:15
Messages (1)
msg376926 - (view) Author: mohamed koubaa (koubaa) * Date: 2020-09-15 03:15
The C-API documentation introduction contains an error:

"Almost all Python objects live on the
heap: you never declare an automatic or static variable of type
:c:type:`PyObject`, only pointer variables of type :c:type:`PyObject*` can  be
declared.  The sole exception are the type objects; since these must never be
deallocated, they are typically static :c:type:`PyTypeObject` objects."

With heap types, PyTypeObject can be deallocated.
History
Date User Action Args
2020-09-15 16:51:11ammar2settitle: C-API documentation -> C-API documentation ignores heap types and says type objects must never be deallocated
2020-09-15 03:15:13koubaacreate