summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-12-05 20:25:22 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-12-05 20:25:22 (GMT)
commitb757c83ec626442a8804b9417790443bf13b4fc8 (patch)
treee9361287f1239fa9758a9387cbd7aa9096a76601 /Python/getargs.c
parent6b335196c50049685e5fd2dc420cbba68de489e8 (diff)
downloadcpython-b757c83ec626442a8804b9417790443bf13b4fc8.zip
cpython-b757c83ec626442a8804b9417790443bf13b4fc8.tar.gz
cpython-b757c83ec626442a8804b9417790443bf13b4fc8.tar.bz2
Issue #22581: Use more "bytes-like object" throughout the docs and comments.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 946faf2..3f47b21 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -849,7 +849,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
/* XXX WAAAAH! 's', 'y', 'z', 'u', 'Z', 'e', 'w' codes all
need to be cleaned up! */
- case 'y': {/* any buffer-like object, but not PyUnicode */
+ case 'y': {/* any bytes-like object */
void **p = (void **)va_arg(*p_va, char **);
char *buf;
Py_ssize_t count;
@@ -880,8 +880,8 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
break;
}
- case 's': /* text string */
- case 'z': /* text string or None */
+ case 's': /* text string or bytes-like object */
+ case 'z': /* text string, bytes-like object or None */
{
if (*format == '*') {
/* "s*" or "z*" */
@@ -897,7 +897,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
arg, msgbuf, bufsize);
PyBuffer_FillInfo(p, arg, sarg, len, 1, 0);
}
- else { /* any buffer-like object */
+ else { /* any bytes-like object */
char *buf;
if (getbuffer(arg, p, &buf) < 0)
return converterr(buf, arg, msgbuf, bufsize);
@@ -908,7 +908,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
arg, msgbuf, bufsize);
}
format++;
- } else if (*format == '#') { /* any buffer-like object */
+ } else if (*format == '#') { /* a string or read-only bytes-like object */
/* "s#" or "z#" */
void **p = (void **)va_arg(*p_va, char **);
FETCH_SIZE;
@@ -926,7 +926,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
*p = sarg;
STORE_SIZE(len);
}
- else { /* any buffer-like object */
+ else { /* read-only bytes-like object */
/* XXX Really? */
char *buf;
Py_ssize_t count = convertbuffer(arg, p, &buf);
@@ -967,7 +967,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
{
Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **);
- if (*format == '#') { /* any buffer-like object */
+ if (*format == '#') {
/* "s#" or "Z#" */
FETCH_SIZE;