Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in

#20064: PyObject_Malloc is not documented

Can't Edit
Can't Publish+Mail
Start Review
5 years, 11 months ago by rdmurray
5 years, 4 months ago
willingc, zachary.ware
haypo, r.david.murray, docs_python.org, BreamoreBoy, gennad, Zach Ware, willingc

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/c-api/memory.rst View 1 chunk +6 lines, -0 lines 3 comments Download


Total messages: 2
+1 on this doc addition. The documentation of the function reflects the actual source code ...
5 years, 4 months ago #1
Zach Ware
5 years, 4 months ago #2
File Doc/c-api/memory.rst (right):

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.

Doc/c-api/memory.rst:328: if *n* is less than 512, allocates *n* bytes with
*pymalloc* allocator and
"if" should be capitalized.

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
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+