bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)

This commit is contained in:
Erlend Egeberg Aasland 2021-02-16 08:50:00 +01:00 committed by GitHub
parent 8a8b5df93f
commit 871eb4237b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View file

@ -995,6 +995,11 @@ PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *base, void *wrapped)
return (PyObject *)descr;
}
int
PyDescr_IsData(PyObject *ob)
{
return Py_TYPE(ob)->tp_descr_set != NULL;
}
/* --- mappingproxy: read-only proxy for mappings --- */