summaryrefslogtreecommitdiffstats
path: root/Include/cpython/coreconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/cpython/coreconfig.h')
-rw-r--r--Include/cpython/coreconfig.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h
index c1a7298..ed2f09f 100644
--- a/Include/cpython/coreconfig.h
+++ b/Include/cpython/coreconfig.h
@@ -33,8 +33,10 @@ typedef struct {
#define _Py_INIT_NO_MEMORY() _Py_INIT_USER_ERR("memory allocation failed")
#define _Py_INIT_EXIT(EXITCODE) \
(_PyInitError){.prefix = NULL, .msg = NULL, .user_err = 0, .exitcode = (EXITCODE)}
+#define _Py_INIT_HAS_EXITCODE(err) \
+ (err.exitcode != -1)
#define _Py_INIT_FAILED(err) \
- (err.msg != NULL || err.exitcode != -1)
+ (err.msg != NULL || _Py_INIT_HAS_EXITCODE(err))
/* --- _PyWstrList ------------------------------------------------ */