Mercurial > cpython-lru_cache-weakref
diff Modules/arraymodule.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 | ae659ff0528b |
| children | 7670005da8c5 |
line wrap: on
line diff
--- a/Modules/arraymodule.c Sun Apr 27 02:28:02 2008 +0000 +++ b/Modules/arraymodule.c Sun Apr 27 03:01:45 2008 +0000 @@ -1257,10 +1257,8 @@ static PyObject * array_fromfile_as_read(arrayobject *self, PyObject *args) { - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "array.read() not supported in 3.x; " - "use array.fromfile()") < 0) + if (PyErr_WarnPy3k("array.read() not supported in 3.x; " + "use array.fromfile()", 1) < 0) return NULL; return array_fromfile(self, args); } @@ -1298,10 +1296,8 @@ static PyObject * array_tofile_as_write(arrayobject *self, PyObject *f) { - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "array.write() not supported in 3.x; " - "use array.tofile()") < 0) + if (PyErr_WarnPy3k("array.write() not supported in 3.x; " + "use array.tofile()", 1) < 0) return NULL; return array_tofile(self, f); }
