Skip to content

Commit f0168d4

Browse files
committed
fix
1 parent c7cd37b commit f0168d4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Python/initconfig.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,10 @@ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
512512
obj = (EXPR); \
513513
if (obj == NULL) \
514514
goto fail; \
515-
if (PyDict_SetItemString(dict, (KEY), obj) < 0) { \
516-
Py_DECREF(obj); \
517-
goto fail; \
518-
} \
515+
int res = PyDict_SetItemString(dict, (KEY), obj); \
519516
Py_DECREF(obj); \
517+
if (res < 0) \
518+
goto fail; \
520519
} while (0)
521520
#define SET_ITEM_INT(VAR) \
522521
SET_ITEM(#VAR, PyLong_FromLong(VAR))

0 commit comments

Comments
 (0)