comparison Objects/bufferobject.c @ 46573:aef3501d8e77 legacy-trunk

Use PyErr_WarnPy3k throughout
author Benjamin Peterson <benjamin@python.org>
date Sun, 27 Apr 2008 03:01:45 +0000
parents 2a866ea66509
children 4fe192d48960
comparison
equal deleted inserted replaced
46572:d58ec38e6db1 46573:aef3501d8e77
231 { 231 {
232 PyObject *ob; 232 PyObject *ob;
233 Py_ssize_t offset = 0; 233 Py_ssize_t offset = 0;
234 Py_ssize_t size = Py_END_OF_BUFFER; 234 Py_ssize_t size = Py_END_OF_BUFFER;
235 235
236 if (Py_Py3kWarningFlag && 236 if (PyErr_WarnPy3k("buffer() not supported in 3.x; "
237 PyErr_WarnEx(PyExc_DeprecationWarning,
238 "buffer() not supported in 3.x; "
239 "use memoryview()", 1) < 0) 237 "use memoryview()", 1) < 0)
240 return NULL; 238 return NULL;
241 239
242 if (!_PyArg_NoKeywords("buffer()", kw)) 240 if (!_PyArg_NoKeywords("buffer()", kw))
243 return NULL; 241 return NULL;