[Python-checkins] python/dist/src/Include dictobject.h,2.30,2.31

aimacintyre at users.sourceforge.net aimacintyre at users.sourceforge.net
Thu Dec 25 19:20:55 EST 2003


Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv23724

Modified Files:
	dictobject.h 
Log Message:
At 2.2, the Py<type>_Check() family of API functions (macros) changed
semantics to include subtypes.  Most concrete object APIs then had
a Py<type>_CheckExact() macro added to test for an object's type
not including subtypes.

The PyDict_CheckExact() macro wasn't created at that time, so I've added
it for API completeness/symmetry - even though nobody has complained
about its absence in the time since 2.2 was released.

Not a backport candidate.


Index: dictobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v
retrieving revision 2.30
retrieving revision 2.31
diff -C2 -d -r2.30 -r2.31
*** dictobject.h	26 Dec 2003 00:19:28 -0000	2.30
--- dictobject.h	26 Dec 2003 00:20:53 -0000	2.31
***************
*** 88,91 ****
--- 88,92 ----
  
  #define PyDict_Check(op) PyObject_TypeCheck(op, &PyDict_Type)
+ #define PyList_CheckExact(op) ((op)->ob_type == &PyDict_Type)
  
  PyAPI_FUNC(PyObject *) PyDict_New(void);





More information about the Python-checkins mailing list