mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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
|
@ -415,8 +415,9 @@ module_clear(PyModuleObject *m)
|
|||
static PyObject *
|
||||
module_dir(PyObject *self, PyObject *args)
|
||||
{
|
||||
_Py_identifier(__dict__);
|
||||
PyObject *result = NULL;
|
||||
PyObject *dict = PyObject_GetAttrString(self, "__dict__");
|
||||
PyObject *dict = _PyObject_GetAttrId(self, &PyId___dict__);
|
||||
|
||||
if (dict != NULL) {
|
||||
if (PyDict_Check(dict))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue