Make _PyUnicode_FromId return borrowed references.

http://mail.python.org/pipermail/python-dev/2011-November/114347.html
This commit is contained in:
Martin v. Löwis 2011-11-07 13:00:05 +01:00
parent e9b11c1cd8
commit d10759f6ed
5 changed files with 5 additions and 12 deletions

View file

@ -666,10 +666,8 @@ warnings_warn_explicit(PyObject *self, PyObject *args, PyObject *kwds)
if ((tmp = _PyUnicode_FromId(&PyId_get_source)) == NULL)
return NULL;
Py_DECREF(tmp);
if ((tmp = _PyUnicode_FromId(&PyId_splitlines)) == NULL)
return NULL;
Py_DECREF(tmp);
/* Check/get the requisite pieces needed for the loader. */
loader = PyDict_GetItemString(module_globals, "__loader__");