[Python-checkins] python/dist/src/Include methodobject.h,2.26,2.27
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sat Dec 13 06:26:13 EST 2003
Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv7484/Include
Modified Files:
methodobject.h
Log Message:
* Added a new method flag, METH_COEXIST.
* Used the flag to optimize set.__contains__(), dict.__contains__(),
dict.__getitem__(), and list.__getitem__().
Index: methodobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/methodobject.h,v
retrieving revision 2.26
retrieving revision 2.27
diff -C2 -d -r2.26 -r2.27
*** methodobject.h 31 Jan 2003 18:33:15 -0000 2.26
--- methodobject.h 13 Dec 2003 11:26:10 -0000 2.27
***************
*** 59,62 ****
--- 59,69 ----
#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 */
More information about the Python-checkins
mailing list