[Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.32,2.33

Tim Peters tim_one@users.sourceforge.net
Mon, 10 Sep 2001 20:07:40 -0700


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

Modified Files:
	unicodeobject.h 
Log Message:
Possibly the end of SF [#460020] bug or feature: unicode() and subclasses.
Changed unicode(i) to return a true Unicode object when i is an instance of
a unicode subclass.  Added PyUnicode_CheckExact macro.


Index: unicodeobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v
retrieving revision 2.32
retrieving revision 2.33
diff -C2 -d -r2.32 -r2.33
*** unicodeobject.h	2001/08/30 03:08:07	2.32
--- unicodeobject.h	2001/09/11 03:07:38	2.33
***************
*** 62,65 ****
--- 62,66 ----
  
  #define PyUnicode_Check(op)                 0
+ #define PyUnicode_CheckExact(op)            0
  
  #else
***************
*** 374,377 ****
--- 375,379 ----
  
  #define PyUnicode_Check(op) PyObject_TypeCheck(op, &PyUnicode_Type)
+ #define PyUnicode_CheckExact(op) ((op)->ob_type == &PyUnicode_Type)
  
  /* Fast access macros */