diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-08 21:54:39 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-08 21:54:39 (GMT) |
commit | 228722ad207dcaeafbb1d5b9fe53d49cb6282039 (patch) | |
tree | 30152ca4b13cd6a28b4103a41a340543af481f17 /Python | |
parent | 818b5cc6db81b32c25d7710fa07453d7045fafa8 (diff) | |
parent | 1a9d687a496ff81db0f6bde1437b0a2dcdd5dba7 (diff) | |
download | cpython-228722ad207dcaeafbb1d5b9fe53d49cb6282039.zip cpython-228722ad207dcaeafbb1d5b9fe53d49cb6282039.tar.gz cpython-228722ad207dcaeafbb1d5b9fe53d49cb6282039.tar.bz2 |
Merge 3.6 (issue #26182)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ast.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Python/ast.c b/Python/ast.c index fcd1563..bfae6ed 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -944,17 +944,19 @@ forbidden_name(struct compiling *c, identifier name, const node *n, PyObject *message = PyUnicode_FromString( "'async' and 'await' will become reserved keywords" " in Python 3.7"); + int ret; if (message == NULL) { return 1; } - if (PyErr_WarnExplicitObject( + ret = PyErr_WarnExplicitObject( PyExc_DeprecationWarning, message, c->c_filename, LINENO(n), NULL, - NULL) < 0) - { + NULL); + Py_DECREF(message); + if (ret < 0) { return 1; } } |