summaryrefslogtreecommitdiffstats
path: root/Include/descrobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-19 18:45:37 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-19 18:45:37 (GMT)
commit492b46f29e8a706d5f27040d58ba6727d962a548 (patch)
tree637afacfd74823b2b6b31bfab3fc6498ae92af8f /Include/descrobject.h
parent69734a52725f1ebd3b508098a61c820784471d66 (diff)
downloadcpython-492b46f29e8a706d5f27040d58ba6727d962a548.zip
cpython-492b46f29e8a706d5f27040d58ba6727d962a548.tar.gz
cpython-492b46f29e8a706d5f27040d58ba6727d962a548.tar.bz2
Make PyDescr_IsData() a macro. It's too simple to be a function.
Should save 4% on slot lookups.
Diffstat (limited to 'Include/descrobject.h')
-rw-r--r--Include/descrobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/descrobject.h b/Include/descrobject.h
index 1319036..6fb6a95 100644
--- a/Include/descrobject.h
+++ b/Include/descrobject.h
@@ -76,7 +76,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *,
struct PyGetSetDef *);
PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
struct wrapperbase *, void *);
-PyAPI_FUNC(int) PyDescr_IsData(PyObject *);
+#define PyDescr_IsData(d) ((d)->ob_type->tp_descr_set != NULL)
PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *);
PyAPI_FUNC(PyObject *) PyWrapper_New(PyObject *, PyObject *);