Skip to content

GH-149501: Fix compilation warning for _YIELD_VALUE#149502

Open
sergey-miryanov wants to merge 3 commits intopython:mainfrom
sergey-miryanov:bug/149501-fix-msvc-warning
Open

GH-149501: Fix compilation warning for _YIELD_VALUE#149502
sergey-miryanov wants to merge 3 commits intopython:mainfrom
sergey-miryanov:bug/149501-fix-msvc-warning

Conversation

@sergey-miryanov
Copy link
Copy Markdown
Contributor

@sergey-miryanov sergey-miryanov commented May 7, 2026

@sergey-miryanov
Copy link
Copy Markdown
Contributor Author

cc @vstinner as an author of the change

@sergey-miryanov sergey-miryanov force-pushed the bug/149501-fix-msvc-warning branch from f3eadda to 0cb3e7d Compare May 7, 2026 17:02
@vstinner
Copy link
Copy Markdown
Member

vstinner commented May 7, 2026

Would it be possible to change i type to size_t or Py_ssize_t instead?

PyAPI_FUNC(_Py_CODEUNIT) _Py_GetBaseCodeUnit(PyCodeObject *code, int offset);
PyAPI_FUNC(_Py_CODEUNIT) _Py_GetBaseCodeUnit(PyCodeObject *code, Py_ssize_t offset);

extern int _PyInstruction_GetLength(PyCodeObject *code, int offset);
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.

Should we change the type here as well for consistency?

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.

2 participants