Skip to content

[3.9] bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)#20897

Merged
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-e822e37-3.9
Jun 15, 2020
Merged

[3.9] bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)#20897
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-e822e37-3.9

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 15, 2020

Copy link
Copy Markdown
Contributor

On Windows, GH-include "pyerrors.h" no longer defines "snprintf" and
"vsnprintf" macros.

PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable
behavior.

Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf()
calls with PyOS_vsnprintf().
(cherry picked from commit e822e37)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue36020

On Windows, GH-include "pyerrors.h" no longer defines "snprintf" and
"vsnprintf" macros.

PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable
behavior.

Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf()
calls with PyOS_vsnprintf().
(cherry picked from commit e822e37)

Co-authored-by: Victor Stinner <vstinner@python.org>

@vstinner 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.

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit b498c7f into python:3.9 Jun 15, 2020
@miss-islington miss-islington deleted the backport-e822e37-3.9 branch June 15, 2020 20:20
@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants