Mercurial > cpython-lru_cache-weakref
comparison Python/sysmodule.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 | fb8d3e1f6161 |
| children | 7670005da8c5 |
comparison
equal
deleted
inserted
replaced
| 46572:d58ec38e6db1 | 46573:aef3501d8e77 |
|---|---|
| 170 sys_exc_clear(PyObject *self, PyObject *noargs) | 170 sys_exc_clear(PyObject *self, PyObject *noargs) |
| 171 { | 171 { |
| 172 PyThreadState *tstate; | 172 PyThreadState *tstate; |
| 173 PyObject *tmp_type, *tmp_value, *tmp_tb; | 173 PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 174 | 174 |
| 175 if (Py_Py3kWarningFlag && | 175 if (PyErr_WarnPy3k("sys.exc_clear() not supported in 3.x; " |
| 176 PyErr_Warn(PyExc_DeprecationWarning, | 176 "use except clauses", 1) < 0) |
| 177 "sys.exc_clear() not supported in 3.x; " | |
| 178 "use except clauses") < 0) | |
| 179 return NULL; | 177 return NULL; |
| 180 | 178 |
| 181 tstate = PyThreadState_GET(); | 179 tstate = PyThreadState_GET(); |
| 182 tmp_type = tstate->exc_type; | 180 tmp_type = tstate->exc_type; |
| 183 tmp_value = tstate->exc_value; | 181 tmp_value = tstate->exc_value; |
