diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-02-27 20:31:03 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-27 20:31:03 +0900 |
commit | c71d24f55828e7f0f2c8750d2e1b04d04539beff (patch) | |
tree | 88a0fd8b9a298791fb0e862c94de5f8370e15490 /Python/getargs.c | |
parent | 145bf269df3530176f6ebeab1324890ef7070bf8 (diff) | |
download | cpython-c71d24f55828e7f0f2c8750d2e1b04d04539beff.tar.gz cpython-c71d24f55828e7f0f2c8750d2e1b04d04539beff.zip |
bpo-43321: Fix SystemError in getargs.c (GH-24656)
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 936eb6a89a3..b85b575a147 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -655,14 +655,14 @@ static const char * convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, char *msgbuf, size_t bufsize, freelist_t *freelist) { +#define RETURN_ERR_OCCURRED return msgbuf /* For # codes */ #define REQUIRE_PY_SSIZE_T_CLEAN \ if (!(flags & FLAG_SIZE_T)) { \ PyErr_SetString(PyExc_SystemError, \ "PY_SSIZE_T_CLEAN macro must be defined for '#' formats"); \ - return NULL; \ + RETURN_ERR_OCCURRED; \ } -#define RETURN_ERR_OCCURRED return msgbuf const char *format = *p_format; char c = *format++; |