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

#20064: PyObject_Malloc is not documented

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

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

Messages

Total messages: 2
willingc_willingconsulting.com
+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
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.
Sign in to reply to this message.

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