diff options
author | Raymond Hettinger <python@rcn.com> | 2003-12-13 11:26:12 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-12-13 11:26:12 +0000 |
commit | da4fc36ea6ec45fde356173e58874a6847af7ce4 (patch) | |
tree | 934a0c69ba8645dfba92e5dcd67587acc2667e2b /Include/methodobject.h | |
parent | 324d4d94c3b034cb7d24bdd9dbd54e465ca8a062 (diff) | |
download | cpython-da4fc36ea6ec45fde356173e58874a6847af7ce4.tar.gz |
* Added a new method flag, METH_COEXIST.
* Used the flag to optimize set.__contains__(), dict.__contains__(),
dict.__getitem__(), and list.__getitem__().
Diffstat (limited to 'Include/methodobject.h')
-rw-r--r-- | Include/methodobject.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/methodobject.h b/Include/methodobject.h index 887385d5e8..0f605499ee 100644 --- a/Include/methodobject.h +++ b/Include/methodobject.h @@ -58,6 +58,13 @@ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *, #define METH_CLASS 0x0010 #define METH_STATIC 0x0020 +/* METH_COEXIST allows a method to be entered eventhough a slot has + already filled the entry. When defined, the flag allows a separate + method, "__contains__" for example, to coexist with a defined + slot like sq_contains. */ + +#define METH_COEXIST 0x0040 + typedef struct PyMethodChain { PyMethodDef *methods; /* Methods of this type */ struct PyMethodChain *link; /* NULL or base type */ |