From b0a9a5a6a4786a6f8f0540e243427775d8ca245e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 5 Sep 2017 20:19:12 -0700 Subject: correct initialization code (#3376) Explicitly initialize struct members rather than relying on compiler extensions. --- Python/pystate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Python/pystate.c') 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); -- cgit v1.2.1