[Python-checkins] CVS: python/dist/src/Include tupleobject.h,2.26,2.27

Tim Peters tim_one@users.sourceforge.net
Mon, 10 Sep 2001 16:37:48 -0700


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

Modified Files:
	tupleobject.h 
Log Message:
More on SF bug [#460020] bug or feature: unicode() and subclasses.
tuple(i) repaired to return a true tuple when i is an instance of a
tuple subclass.
Added PyTuple_CheckExact macro.
PySequence_Tuple():  if a tuple-like object isn't exactly a tuple, it's
not safe to return the object as-is -- make a new tuple of it instead.


Index: tupleobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/tupleobject.h,v
retrieving revision 2.26
retrieving revision 2.27
diff -C2 -d -r2.26 -r2.27
*** tupleobject.h	2001/08/30 03:08:07	2.26
--- tupleobject.h	2001/09/10 23:37:46	2.27
***************
*** 28,31 ****
--- 28,32 ----
  
  #define PyTuple_Check(op) PyObject_TypeCheck(op, &PyTuple_Type)
+ #define PyTuple_CheckExact(op) ((op)->ob_type == &PyTuple_Type)
  
  extern DL_IMPORT(PyObject *) PyTuple_New(int size);