bpo-38540: Revert a warning if PY_SSIZE_T_CLEAN is not defined. (GH-16876)

This commit is contained in:
Serhiy Storchaka 2019-10-21 21:41:09 +03:00 committed by GitHub
parent 175abccbbf
commit 928c68eee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 13 deletions

View File

@ -1176,19 +1176,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
trailing 0-byte
*/
int *q = NULL; Py_ssize_t *q2 = NULL;
if (flags & FLAG_SIZE_T) {
q2 = va_arg(*p_va, Py_ssize_t*);
}
else {
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"PY_SSIZE_T_CLEAN will be required for '#' formats", 1))
{
Py_DECREF(s);
return NULL;
}
q = va_arg(*p_va, int*);
}
FETCH_SIZE;
format++;
if (q == NULL && q2 == NULL) {