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

Minor: fix unicode-related inline function warnings by wjakob · Pull Request #93011 · python/cpython · GitHub

Repository navigation

Minor: fix unicode-related inline function warnings - #93011

Merged
vstinner merged 1 commit into
python:mainfrom
wjakob:unicode-warning
May 23, 2022
Merged

vstinner merged 1 commit into
python:mainfrom
wjakob:unicode-warning

Conversation

wjakob commented May 20, 2022

Copy link
Copy Markdown
Contributor

When compiling my extension module against latest main version of CPython, I get many warnings related to unused parameters in unicodeobject.h. Example:

In file included from /Users/wjakob/nanobind/src/tensor.cpp:1:
In file included from /Users/wjakob/nanobind/include/nanobind/tensor.h:14:
In file included from /Users/wjakob/nanobind/include/nanobind/nanobind.h:37:
In file included from /Users/wjakob/nanobind/include/nanobind/nb_python.h:22:
In file included from /Users/wjakob/cpython-dist/include/python3.12/Python.h:51:
In file included from /Users/wjakob/cpython-dist/include/python3.12/unicodeobject.h:1029:
/Users/wjakob/cpython-dist/include/python3.12/cpython/unicodeobject.h:196:57: warning: unused parameter 'op' [-Wunused-parameter]
static inline unsigned int PyUnicode_IS_READY(PyObject *op) {
                                                        ^
/Users/wjakob/cpython-dist/include/python3.12/cpython/unicodeobject.h:416:45: warning: unused parameter 'op' [-Wunused-parameter]
static inline int PyUnicode_READY(PyObject *op)
                                            ^

This PR fixes those warnings. This isn't really a bug in Python, so I did not create a corresponding issue tracker ticket.

ghost commented May 20, 2022 •
edited by ghost
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

wjakob commented May 20, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

@bedevere-bot (This issue seems too minor to warrant an issue number or a NEWS entry)

JelleZijlstra left a comment

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

Thanks for your contribution! cc @vstinner who worked on this file recently.

I think we can skip the news entry here because the problem it fixes hasn't been in any release (it's in the main branch only). If it had been in a release, we should have added a NEWS entry because it's a user-visible change.

I'll leave this open for a few days in case Victor or others have comments, and then merge.

Copy link
Copy Markdown
Member

Thanks for your contribution! cc @vstinner who worked on this file recently.

cc @methane who introduced the warning.

Comment thread Include/cpython/unicodeobject.h Outdated
Comment thread Include/cpython/unicodeobject.h Outdated
wjakob force-pushed the unicode-warning branch from 723bde1 to 2e58f1b Compare May 23, 2022 11:33

wjakob commented May 23, 2022

Copy link
Copy Markdown
Contributor Author

(Commit amended with tweaked syntax)

vstinner left a comment

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

LGTM.

vstinner merged commit b2694ab into python:main May 23, 2022

Copy link
Copy Markdown
Member

Merged, thanks.

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.

5 participants


Back | FazBrowse Home | New Git URL