diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-09-05 20:19:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-05 20:19:12 -0700 |
commit | b0a9a5a6a4786a6f8f0540e243427775d8ca245e (patch) | |
tree | 09bedca2ded5244ed7c1a0e7a726bcca9dba34da /Python/pystate.c | |
parent | 76d5abc8684bac4f2fc7cccfe2cd940923357351 (diff) | |
download | cpython-git-b0a9a5a6a4786a6f8f0540e243427775d8ca245e.tar.gz |
correct initialization code (#3376)
Explicitly initialize struct members rather than relying on compiler extensions.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 3d3207702f..2d926372fd 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -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); |