summaryrefslogtreecommitdiffstats
path: root/Python/modsupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 8a77a7b..6255822 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -342,8 +342,13 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
++*p_format;
if (flags & FLAG_SIZE_T)
n = va_arg(*p_va, Py_ssize_t);
- else
+ else {
+ if (PyErr_WarnEx(PyExc_DeprecationWarning,
+ "PY_SSIZE_T_CLEAN will be required for '#' formats", 1)) {
+ return NULL;
+ }
n = va_arg(*p_va, int);
+ }
}
else
n = -1;
@@ -390,8 +395,13 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
++*p_format;
if (flags & FLAG_SIZE_T)
n = va_arg(*p_va, Py_ssize_t);
- else
+ else {
+ if (PyErr_WarnEx(PyExc_DeprecationWarning,
+ "PY_SSIZE_T_CLEAN will be required for '#' formats", 1)) {
+ return NULL;
+ }
n = va_arg(*p_va, int);
+ }
}
else
n = -1;
@@ -423,8 +433,13 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
++*p_format;
if (flags & FLAG_SIZE_T)
n = va_arg(*p_va, Py_ssize_t);
- else
+ else {
+ if (PyErr_WarnEx(PyExc_DeprecationWarning,
+ "PY_SSIZE_T_CLEAN will be required for '#' formats", 1)) {
+ return NULL;
+ }
n = va_arg(*p_va, int);
+ }
}
else
n = -1;