This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年07月09日 19:44 by gregory.p.smith, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg222633 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2014年07月09日 19:44 | |
The Py_SIZE() macro is not documented. It should be. It is very useful along with PyList_New(positive_number) after using PyList_SET_ITEM() to fill in up to the first positive_number elements of a list object in the most optimal manner by avoiding numerous redundant array resizes and error checks along the away. The Py_SIZE() macro was introduced (in 2.6 I believe) and is specifically intended for use as an lvalue (see http://bugs.python.org/issue1724 to confirm that). It currently has uses in several places in CPython's core and modules as well as within some third party extension modules and tools such as Cython). |
|||
| msg258821 - (view) | Author: Tamás Bence Gedai (beng94) * | Date: 2016年01月22日 16:27 | |
Py_SIZE: https://docs.python.org/3.5/c-api/structures.html#c.Py_SIZE PyList_New: https://docs.python.org/3.5/c-api/list.html#c.PyList_New I think they're documented now, so I guess the issue can be closed. |
|||
| msg258825 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2016年01月22日 16:43 | |
Thanks for triaging! The relevant commit is 760c5cfacbaa. |
|||
| msg258837 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年01月22日 21:17 | |
New changeset 63183596db79 by Gregory P. Smith in branch '2.7': Per issue21949 and issue1629: Document the Py_SIZE, Py_TYPE, Py_REFCNT macros. https://hg.python.org/cpython/rev/63183596db79 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:05 | admin | set | github: 66148 |
| 2016年01月22日 21:18:28 | gregory.p.smith | set | resolution: out of date -> fixed |
| 2016年01月22日 21:17:59 | python-dev | set | nosy:
+ python-dev messages: + msg258837 |
| 2016年01月22日 16:43:52 | berker.peksag | set | status: open -> closed nosy: + berker.peksag messages: + msg258825 resolution: out of date stage: needs patch -> resolved |
| 2016年01月22日 16:27:42 | beng94 | set | nosy:
+ beng94 messages: + msg258821 |
| 2014年10月19日 18:33:08 | berker.peksag | set | type: performance -> enhancement stage: needs patch |
| 2014年07月09日 19:44:44 | gregory.p.smith | create | |