[issue28761] Add the const qualifier to fields name and doc of public structs

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +1068

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Nick.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42b0ba372ec2 by Serhiy Storchaka in branch 'default':
Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef,
https://hg.python.org/cpython/rev/42b0ba372ec2

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Nick Coghlan

Nick Coghlan added the comment:

+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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

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.

--
components: Interpreter Core
files: const-name-and-doc-fields.patch
keywords: patch
messages: 281340
nosy: ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add the const qualifier to fields name and doc of public structs
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45581/const-name-and-doc-fields.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com