diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-14 15:16:45 +0200 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-14 15:16:45 +0200 |
| commit | 406e4d8f1d3d003e8754d9e65607a697e7f5c865 (patch) | |
| tree | 9ef98f39182048c092c1c895e0e0a8ebad43d875 /Python/ceval.c | |
| parent | f5ad3b280b43227eb0e3fa63d89490a58ba9c28b (diff) | |
| download | cpython-406e4d8f1d3d003e8754d9e65607a697e7f5c865.tar.gz | |
Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.
Diffstat (limited to 'Python/ceval.c')
| -rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 543c6f2179..8d980fdc93 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4422,7 +4422,9 @@ import_from(PyObject *v, PyObject *name) static int import_all_from(PyObject *locals, PyObject *v) { - PyObject *all = PyObject_GetAttrString(v, "__all__"); + _Py_IDENTIFIER(__all__); + _Py_IDENTIFIER(__dict__); + PyObject *all = _PyObject_GetAttrId(v, &PyId___all__); PyObject *dict, *name, *value; int skip_leading_underscores = 0; int pos, err; @@ -4431,7 +4433,7 @@ import_all_from(PyObject *locals, PyObject *v) if (!PyErr_ExceptionMatches(PyExc_AttributeError)) return -1; /* Unexpected error */ PyErr_Clear(); - dict = PyObject_GetAttrString(v, "__dict__"); + dict = _PyObject_GetAttrId(v, &PyId___dict__); if (dict == NULL) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) return -1; |
