mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
#2355: py3k warning for buffer().
This commit is contained in:
parent
aef3e529e2
commit
80055f6295
3 changed files with 13 additions and 1 deletions
|
|
@ -229,6 +229,11 @@ PyBuffer_New(Py_ssize_t size)
|
|||
static PyObject *
|
||||
buffer_new(PyTypeObject *type, PyObject *args, PyObject *kw)
|
||||
{
|
||||
if (Py_Py3kWarningFlag &&
|
||||
PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"buffer will be removed in 3.x", 1) < 0)
|
||||
return NULL;
|
||||
|
||||
PyObject *ob;
|
||||
Py_ssize_t offset = 0;
|
||||
Py_ssize_t size = Py_END_OF_BUFFER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue