diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-04-27 03:01:45 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-04-27 03:01:45 +0000 |
commit | 9f4f48114fbf2df3803a44a30cd14e11679403fe (patch) | |
tree | 701fc350aa3a6ebf282fdb92e891c793f65db0fb /Objects/fileobject.c | |
parent | a692c4df63a41c42f2ce10a4521136d1440a712d (diff) | |
download | cpython-git-9f4f48114fbf2df3803a44a30cd14e11679403fe.tar.gz |
Use PyErr_WarnPy3k throughout
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index d61e6a0beb..ef0323256a 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -1910,9 +1910,7 @@ get_newlines(PyFileObject *f, void *closure) static PyObject * get_softspace(PyFileObject *f, void *closure) { - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "file.softspace not supported in 3.x") < 0) + if (PyErr_WarnPy3k("file.softspace not supported in 3.x", 1) < 0) return NULL; return PyInt_FromLong(f->f_softspace); } @@ -1921,9 +1919,7 @@ static int set_softspace(PyFileObject *f, PyObject *value) { int new; - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "file.softspace not supported in 3.x") < 0) + if (PyErr_WarnPy3k("file.softspace not supported in 3.x", 1) < 0) return -1; if (value == NULL) { |