
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2016-11-21 09:40 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| const-name-and-doc-fields.patch | serhiy.storchaka,2016-11-21 09:40 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft,2017-03-31 16:36 | |
| Messages (4) | |||
|---|---|---|---|
| msg281340 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-11-21 09:40 | |
Proposed patch makes the fields name and doc of structures PyMemberDef, PyGetSetDef, PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase being of type "const char *" rather of "char *".These structures often are initialized as static variables and name and doc fields are initialized from literal strings. These fields are always refer to constant string literal, NULL, or readonly UTF8 representation of a Unicode object. They are never refer to mutable data. Changing the data referred by these pointers is an error. Adding the const qualifier makes clear that this is an immutable data.This change may need some changes in third-party code. But it needs to change only one line in CPython sources, and I believe that most third-party projects don't need any changes at all. | |||
| msg281357 -(view) | Author: Alyssa Coghlan (ncoghlan)*![]() | Date: 2016-11-21 14:04 | |
+1 from me. The only thing I noticed in the patch was that the issue number needs filling in now that you've filed it. | |||
| msg281434 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-11-22 05:58 | |
New changeset42b0ba372ec2 by Serhiy Storchaka in branch 'default':Issue#28761: The fields name and doc of structures PyMemberDef, PyGetSetDef,https://hg.python.org/cpython/rev/42b0ba372ec2 | |||
| msg281436 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-11-22 06:03 | |
Thanks Nick. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:39 | admin | set | github: 72947 |
| 2017-03-31 16:36:34 | dstufft | set | pull_requests: +pull_request1068 |
| 2016-11-22 06:04:38 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2016-11-22 06:03:58 | serhiy.storchaka | set | messages: +msg281436 |
| 2016-11-22 05:58:45 | python-dev | set | nosy: +python-dev messages: +msg281434 |
| 2016-11-21 14:04:34 | ncoghlan | set | messages: +msg281357 |
| 2016-11-21 09:40:15 | serhiy.storchaka | create | |