commit | 871eb4237b9be95263ca13ba8856e78344eb9eba | [log] [tgz] |
---|---|---|
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | Tue Feb 16 08:50:00 2021 +0100 |
committer | GitHub <noreply@github.com> | Tue Feb 16 08:50:00 2021 +0100 |
tree | 25e8e7ac21e5656233c0111593e0de37e304ce65 | |
parent | 8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a [diff] [blame] |
bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)
diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 16c695a..35fbffd 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c
@@ -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 --- */