summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTravis E. Oliphant <oliphant@enthought.com>2007-10-13 21:03:27 (GMT)
committerTravis E. Oliphant <oliphant@enthought.com>2007-10-13 21:03:27 (GMT)
commitddacf968682818a34a90ec6702fbb44098914a9d (patch)
treef7f6ccb66009a525c1f8aa176626a8b95a516cef /Python
parentd417a154e4fcae12fd17b160762eafe8eec6d3f5 (diff)
downloadcpython-ddacf968682818a34a90ec6702fbb44098914a9d.zip
cpython-ddacf968682818a34a90ec6702fbb44098914a9d.tar.gz
cpython-ddacf968682818a34a90ec6702fbb44098914a9d.tar.bz2
Eliminate use of PyBUF_CHARACTER flag which is no longer part of the buffer interface. Fix up array module to export the correct format for wide-builds.
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index dc1bae0..de9cc93 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1237,7 +1237,9 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
(*pb->bf_releasebuffer)(arg, &view);
break;
}
-
+
+ /*TEO: This can be eliminated --- here only for backward
+ compatibility */
case 't': { /* 8-bit character buffer, read-only access */
char **p = va_arg(*p_va, char **);
PyBufferProcs *pb = arg->ob_type->tp_as_buffer;
@@ -1253,7 +1255,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
"string or read-only character buffer",
arg, msgbuf, bufsize);
- if ((*pb->bf_getbuffer)(arg, &view, PyBUF_CHARACTER) != 0)
+ if ((*pb->bf_getbuffer)(arg, &view, PyBUF_SIMPLE) != 0)
return converterr("string or single-segment read-only buffer",
arg, msgbuf, bufsize);