summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-02-16 07:50:00 (GMT)
committerGitHub <noreply@github.com>2021-02-16 07:50:00 (GMT)
commit871eb4237b9be95263ca13ba8856e78344eb9eba (patch)
tree25e8e7ac21e5656233c0111593e0de37e304ce65 /Objects
parent8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a (diff)
downloadcpython-871eb4237b9be95263ca13ba8856e78344eb9eba.zip
cpython-871eb4237b9be95263ca13ba8856e78344eb9eba.tar.gz
cpython-871eb4237b9be95263ca13ba8856e78344eb9eba.tar.bz2
bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/descrobject.c5
1 files changed, 5 insertions, 0 deletions
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 --- */