mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
correct initialization code (#3376)
Explicitly initialize struct members rather than relying on compiler extensions.
This commit is contained in:
parent
76d5abc868
commit
b0a9a5a6a4
2 changed files with 2 additions and 3 deletions
|
@ -37,8 +37,7 @@ extern "C" {
|
|||
void
|
||||
_PyRuntimeState_Init(_PyRuntimeState *runtime)
|
||||
{
|
||||
_PyRuntimeState initial = {};
|
||||
*runtime = initial;
|
||||
memset(runtime, 0, sizeof(*runtime));
|
||||
|
||||
_PyObject_Initialize(&runtime->obj);
|
||||
_PyMem_Initialize(&runtime->mem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue