[Python-checkins] CVS: python/dist/src/Include stringobject.h,2.30,2.31

Tim Peters tim_one@users.sourceforge.net
Mon, 10 Sep 2001 18:42:01 -0700


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

Modified Files:
	stringobject.h 
Log Message:
More on SF bug [#460020] bug or feature: unicode() and subclasses.
Repaired str(i) to return a genuine string when i is an instance of a str
subclass.  New PyString_CheckExact() macro.


Index: stringobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v
retrieving revision 2.30
retrieving revision 2.31
diff -C2 -d -r2.30 -r2.31
*** stringobject.h	2001/08/30 03:08:07	2.30
--- stringobject.h	2001/09/11 01:41:58	2.31
***************
*** 53,56 ****
--- 53,57 ----
  
  #define PyString_Check(op) PyObject_TypeCheck(op, &PyString_Type)
+ #define PyString_CheckExact(op) ((op)->ob_type == &PyString_Type)
  
  extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int);