mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-45666: Use %S
for MSVC and %s
elsewhere for swprintf
in _testembed.c
(GH-29341)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
This commit is contained in:
parent
e73283a20f
commit
401d25e92f
1 changed files with 7 additions and 1 deletions
|
@ -1733,7 +1733,13 @@ static int check_use_frozen_modules(const char *rawval)
|
|||
if (rawval == NULL) {
|
||||
wcscpy(optval, L"frozen_modules");
|
||||
}
|
||||
else if (swprintf(optval, 100, L"frozen_modules=%S", rawval) < 0) {
|
||||
else if (swprintf(optval, 100,
|
||||
#if defined(_MSC_VER)
|
||||
L"frozen_modules=%S",
|
||||
#else
|
||||
L"frozen_modules=%s",
|
||||
#endif
|
||||
rawval) < 0) {
|
||||
error("rawval is too long");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue