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

@ -2024,7 +2024,7 @@ PyAPI_FUNC(int) _PyUnicode_CheckConsistency(
shutdown, all strings are released (through _PyUnicode_ClearStaticStrings).
Alternatively, _Py_static_string allows to choose the variable name.
_PyUnicode_FromId returns a new reference to the interned string.
_PyUnicode_FromId returns a borrowed reference to the interned string.
_PyObject_{Get,Set,Has}AttrId are __getattr__ versions using _Py_Identifier*.
*/
typedef struct _Py_Identifier {