[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

STINNER Victor report at bugs.python.org
Mon Jun 15 11:00:06 EDT 2020


STINNER Victor <vstinner at python.org> added the comment:

I wrote PR 20889 which removes "snprintf" and "vsnprintf" macros from pyerrors.h. I propose to backport the change to 3.9, but leave 3.8 unchanged.

On Python 3.8 and older, the workaround is to manually undefine the macros:
---
#include <Python.h>
// Undefine macros to work around https://bugs.python.org/issue36020
#undef snprintf
#undef vsnprintf
---

----------
versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36020>
_______________________________________


More information about the Python-bugs-list mailing list