mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
[3.10] gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931) (GH-94963)
(cherry picked from commit 067f0da335
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
374afb4a4e
commit
31a390e43f
4 changed files with 37 additions and 8 deletions
|
@ -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 *);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue