bpo-36020: Remove snprintf macro in pyerrors.h by vstinner · Pull Request #20889 · python/cpython

@vstinner

On Windows, #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().

@vstinner

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jun 15, 2020
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>

miss-islington added a commit that referenced this pull request

Jun 15, 2020
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>