mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use identifier API for PyObject_GetAttrString.
This commit is contained in:
parent
794d567b17
commit
1ee1b6fe0d
28 changed files with 499 additions and 357 deletions
|
@ -1299,7 +1299,8 @@ property_init(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
|
||||
/* if no docstring given and the getter has one, use that one */
|
||||
if ((doc == NULL || doc == Py_None) && get != NULL) {
|
||||
PyObject *get_doc = PyObject_GetAttrString(get, "__doc__");
|
||||
_Py_identifier(__doc__);
|
||||
PyObject *get_doc = _PyObject_GetAttrId(get, &PyId___doc__);
|
||||
if (get_doc) {
|
||||
if (Py_TYPE(self) == &PyProperty_Type) {
|
||||
Py_XDECREF(prop->prop_doc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue