From 871eb4237b9be95263ca13ba8856e78344eb9eba Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Tue, 16 Feb 2021 08:50:00 +0100 Subject: bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535) --- Objects/descrobject.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Objects') diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 16c695a08f4..35fbffd914a 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 --- */ -- cgit v1.2.3-65-gdbad