Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-91768: C API no longer use "const PyObject*" type#91769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 2 commits intopython:mainfromvstinner:nonconst_pyobject
Apr 21, 2022
Merged

gh-91768: C API no longer use "const PyObject*" type#91769

vstinner merged 2 commits intopython:mainfromvstinner:nonconst_pyobject
Apr 21, 2022

Conversation

vstinner
Copy link
Member

Py_REFCNT(), Py_TYPE(), Py_SIZE() and Py_IS_TYPE() functions argument
type is now "PyObject*", rather than "const PyObject*".

  • Replace also "const PyObject*" with "PyObject*" in functions:

    • _Py_strhex_impl()
    • _Py_strhex_with_sep()
    • _Py_strhex_bytes_with_sep()
  • Remove _PyObject_CAST_CONST() and _PyVarObject_CAST_CONST() macros

  • Py_IS_TYPE() can now use Py_TYPE() in its implementation

Py_REFCNT(), Py_TYPE(), Py_SIZE() and Py_IS_TYPE() functions argumenttype is now "PyObject*", rather than "const PyObject*".* Replace also "const PyObject*" with "PyObject*" in functions:  * _Py_strhex_impl()  * _Py_strhex_with_sep()  * _Py_strhex_bytes_with_sep()* Remove _PyObject_CAST_CONST() and _PyVarObject_CAST_CONST() macros* Py_IS_TYPE() can now use Py_TYPE() in its implementation
@vstinner
Copy link
MemberAuthor

This change is backward compatible since modified macros cast their argument toPyObject*.

@vstinner
Copy link
MemberAuthor

cc@erlend-aasland

Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

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

You also need to update the documentation.

@vstinner
Copy link
MemberAuthor

You also need to update the documentation.

Done.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@erlend-aaslanderlend-aaslanderlend-aasland requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@erlend-aasland@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp