FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-39943: Keep constness of pointer objects. by petdance · Pull Request #19186 · python/cpython · GitHub

Repository navigation

bpo-39943: Keep constness of pointer objects. - #19186

Closed
petdance wants to merge 1 commit into
python:masterfrom
petdance:const-Objects-typeobject
Closed

petdance wants to merge 1 commit into
python:masterfrom
petdance:const-Objects-typeobject

Conversation

petdance commented Mar 27, 2020 •
edited
Loading

Copy link
Copy Markdown
Contributor

Also moved an auto variable that got consted into its innermost
necessary scope.

Note that this is the same type of patch as #19185, but in a different source file. If it's easier for the folks that go through these patches to have similar changes to multiple source files put together in one PR, let me know and I'll do that going forward.

https://bugs.python.org/issue39943

Also moved an auto variable that got consted into its innermost
necessary scope.
Comment thread Objects/typeobject.c
static PyTypeObject *best_base(PyObject *);
static int mro_internal(PyTypeObject *, PyObject **);
static int type_is_subtype_base_chain(PyTypeObject *, PyTypeObject *);
static int type_is_subtype_base_chain(const PyTypeObject *, const PyTypeObject *);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please do not add const to PyObject pointers (and PyTypeObject is a subtype of PyObject). They are inherently mutable. If the particular function does not mutate them in the particular Python version, it is just an implementation detail.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Will do. I know we've discussed before, but this was an old branch. Sorry. I'll resubmit.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL