diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-07-19 18:57:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 18:57:59 (GMT) |
commit | 31a390e43f2ea2608c5ec04de7d012df14f16fda (patch) | |
tree | 8060611d89a8455b79c1beb04e27bb65e8239f60 /Python/getargs.c | |
parent | 374afb4a4e93d3faafcf1d08fcd650d8ee8798ca (diff) | |
download | cpython-31a390e43f2ea2608c5ec04de7d012df14f16fda.zip cpython-31a390e43f2ea2608c5ec04de7d012df14f16fda.tar.gz cpython-31a390e43f2ea2608c5ec04de7d012df14f16fda.tar.bz2 |
[3.10] gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931) (GH-94963)
(cherry picked from commit 067f0da33506f70c36a67d5f3d8d011c8dae10c9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 92fc0af..d92ea2d 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2533,9 +2533,7 @@ skipitem(const char **p_format, va_list *p_va, int flags) if (*format == '#') { if (p_va != NULL) { if (!(flags & FLAG_SIZE_T)) { - PyErr_SetString(PyExc_SystemError, - "PY_SSIZE_T_CLEAN macro must be defined for '#' formats"); - return NULL; + return "PY_SSIZE_T_CLEAN macro must be defined for '#' formats"; } (void) va_arg(*p_va, Py_ssize_t *); } |