pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/89f8177dcfdbcf17c85bb6998c946c9f42bf6e27

55097560d244c08.css" /> bpo-38304: Fix PyConfig usage in python_uwp.cpp (GH-16487) · python/cpython@89f8177 · GitHub
Skip to content

Commit 89f8177

Browse files
authored
bpo-38304: Fix PyConfig usage in python_uwp.cpp (GH-16487)
* Set PyPreConfig.struct_size and PyConfig.struct_size as required by the API. * PyPreConfig_InitPythonConfig() can now fail: check PyStatus result.
1 parent fc4a044 commit 89f8177

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

PC/python_uwp.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ wmain(int argc, wchar_t **argv)
167167
PyStatus status;
168168

169169
PyPreConfig preconfig;
170+
preconfig.struct_size = sizeof(PyPreConfig);
171+
170172
PyConfig config;
173+
config.struct_size = sizeof(PyConfig);
171174

172175
const wchar_t *moduleName = NULL;
173176
const wchar_t *p = wcsrchr(argv[0], L'\\');
@@ -186,7 +189,10 @@ wmain(int argc, wchar_t **argv)
186189
}
187190
}
188191

189-
PyPreConfig_InitPythonConfig(&preconfig);
192+
status = PyPreConfig_InitPythonConfig(&preconfig);
193+
if (PyStatus_Exception(status)) {
194+
goto fail_without_config;
195+
}
190196
if (!moduleName) {
191197
status = Py_PreInitializeFromArgs(&preconfig, argc, argv);
192198
if (PyStatus_Exception(status)) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy