summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-04-27 03:01:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-04-27 03:01:45 (GMT)
commit9f4f48114fbf2df3803a44a30cd14e11679403fe (patch)
tree701fc350aa3a6ebf282fdb92e891c793f65db0fb /Modules/arraymodule.c
parenta692c4df63a41c42f2ce10a4521136d1440a712d (diff)
downloadcpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.zip
cpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.tar.gz
cpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.tar.bz2
Use PyErr_WarnPy3k throughout
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index a77fd7d..a2b454a 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1257,10 +1257,8 @@ array. Also called as read.");
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 @@ write.");
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);
}