[Python-checkins] python/dist/src/Include dictobject.h,2.27,2.28
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Tue Nov 25 16:12:16 EST 2003
Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv24958/Include
Modified Files:
dictobject.h
Log Message:
Expose dict_contains() and PyDict_Contains() with is about 10% faster
than PySequence_Contains() and more clearly applicable to dicts.
Apply the new function in setobject.c where __contains__ checking is
ubiquitous.
Index: dictobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v
retrieving revision 2.27
retrieving revision 2.28
diff -C2 -d -r2.27 -r2.28
*** dictobject.h 3 May 2003 06:51:58 -0000 2.27
--- dictobject.h 25 Nov 2003 21:12:14 -0000 2.28
***************
*** 101,104 ****
--- 101,105 ----
PyAPI_FUNC(int) PyDict_Size(PyObject *mp);
PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp);
+ PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key);
/* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */
More information about the Python-checkins
mailing list