mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Use PyErr_WarnPy3k throughout
This commit is contained in:
parent
a692c4df63
commit
9f4f48114f
14 changed files with 47 additions and 88 deletions
|
|
@ -233,9 +233,7 @@ buffer_new(PyTypeObject *type, PyObject *args, PyObject *kw)
|
|||
Py_ssize_t offset = 0;
|
||||
Py_ssize_t size = Py_END_OF_BUFFER;
|
||||
|
||||
if (Py_Py3kWarningFlag &&
|
||||
PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"buffer() not supported in 3.x; "
|
||||
if (PyErr_WarnPy3k("buffer() not supported in 3.x; "
|
||||
"use memoryview()", 1) < 0)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue