Use PyErr_WarnPy3k throughout

This commit is contained in:
Benjamin Peterson 2008-04-27 03:01:45 +00:00
parent a692c4df63
commit 9f4f48114f
14 changed files with 47 additions and 88 deletions

View file

@ -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) {