diff options
Diffstat (limited to 'Python/codegen.c')
-rw-r--r-- | Python/codegen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/codegen.c b/Python/codegen.c index 976c94234d6..d79aee4859e 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -1243,10 +1243,10 @@ codegen_function_body(compiler *c, stmt_ty s, int is_async, Py_ssize_t funcflags _PyCompile_ExitScope(c); return ERROR; } + Py_ssize_t idx = _PyCompile_AddConst(c, docstring); + Py_DECREF(docstring); + RETURN_IF_ERROR_IN_SCOPE(c, idx < 0 ? ERROR : SUCCESS); } - Py_ssize_t idx = _PyCompile_AddConst(c, docstring ? docstring : Py_None); - Py_XDECREF(docstring); - RETURN_IF_ERROR_IN_SCOPE(c, idx < 0 ? ERROR : SUCCESS); NEW_JUMP_TARGET_LABEL(c, start); USE_LABEL(c, start); |