Issue38650
Created on 2019-10-30 20:01 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 17005 | merged | serhiy.storchaka, 2019-10-30 20:05 | |
| Messages (4) | |||
|---|---|---|---|
| msg355731 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2019-10-30 20:01 | |
Currently the variable PyStructSequence_UnnamedField has type "char *". It is used as a special value for setting to the name field of PyStructSequence_Field. But the type of the name field is "const char *". I propose to change the declaration of PyStructSequence_UnnamedField to "const char * const". Makes it referring to immutable character string and make it itself immutable. It is binary compatible change, but some user code can complain at compilation time if it uses PyStructSequence_UnnamedField in unusual way (assigns to the "char *" variable, etc). It is very unlikely. |
|||
| msg356755 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2019-11-16 16:55 | |
New changeset bd44a7ead9f7336d7bb45f186b2b6ca0300154f7 by Serhiy Storchaka in branch 'master': bpo-38650: Constify PyStructSequence_UnnamedField. (GH-17005) https://github.com/python/cpython/commit/bd44a7ead9f7336d7bb45f186b2b6ca0300154f7 |
|||
| msg356757 - (view) | Author: Dong-hee Na (corona10) * | Date: 2019-11-16 17:11 | |
Looks like https://github.com/python/cpython/blob/088b63ea7a8331a3e34bc93c3b873c60354b4fad/Tools/c-analyzer/known.tsv#L1549 should be updated also. What do you think? |
|||
| msg357318 - (view) | Author: Eric Snow (eric.snow) * | Date: 2019-11-22 19:51 | |
I wouldn't worry about the c-analyzer stuff for now. I plan on re-generating the file in the near future. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:22 | admin | set | github: 82831 |
| 2019-11-22 19:51:57 | eric.snow | set | nosy:
+ eric.snow messages: + msg357318 |
| 2019-11-16 17:22:45 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-11-16 17:11:50 | corona10 | set | nosy:
+ corona10 messages: + msg356757 |
| 2019-11-16 16:55:33 | serhiy.storchaka | set | messages: + msg356755 |
| 2019-10-30 20:05:36 | serhiy.storchaka | set | keywords:
+ patch stage: patch review pull_requests: + pull_request16532 |
| 2019-10-30 20:01:43 | serhiy.storchaka | create | |