[docs] PyObject_Malloc is not documented (issue 20064)

zachary.ware at gmail.com zachary.ware at gmail.com
Mon Jul 21 19:24:56 CEST 2014


http://bugs.python.org/review/20064/diff/10412/Doc/c-api/memory.rst
File Doc/c-api/memory.rst (right):

http://bugs.python.org/review/20064/diff/10412/Doc/c-api/memory.rst#newcode326
Doc/c-api/memory.rst:326: .. c:function:: void* PyObject_Malloc(size_t
n)
I'm not sure this is the right section for this function, this section
is about customizing the PyObject Arena Allocator.  I think it would be
better to add a new section for PyObject_(Malloc|Realloc|Free) just
under the "Memory Interface" section, and probably steal most of the
first paragraph of this section to head the new one.

http://bugs.python.org/review/20064/diff/10412/Doc/c-api/memory.rst#newcode328
Doc/c-api/memory.rst:328: if *n* is less than 512, allocates *n* bytes
with *pymalloc* allocator and
"if" should be capitalized.

http://bugs.python.org/review/20064/diff/10412/Doc/c-api/memory.rst#newcode331
Doc/c-api/memory.rst:331: Falls back to :c:func:`PyMem_RawMalloc` for
allocations larger than 512 bytes.
If this sentence is meant to be part of the same paragraph, it should
continue the previous line.  If it is meant to be separate, there should
be a blank line before it.  The way this is, Sphinx considers it to be
part of the previous paragraph.

http://bugs.python.org/review/20064/


More information about the docs mailing list