mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
Make _PyUnicode_FromId return borrowed references.
http://mail.python.org/pipermail/python-dev/2011-November/114347.html
This commit is contained in:
parent
e9b11c1cd8
commit
d10759f6ed
5 changed files with 5 additions and 12 deletions
|
@ -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__");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue