[Python-checkins] CVS: python/dist/src/Objects object.c,2.82,2.83

Fredrik Lundh python-dev@python.org
Sat, 8 Jul 2000 10:43:35 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14846/Objects

Modified Files:
	object.c 
Log Message:


- changed __repr__ to use "unicode escape" encoding for unicode
  strings, instead of the default encoding.
  (see "minidom" thread for discussion, and also patch #100706)

Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.82
retrieving revision 2.83
diff -C2 -r2.82 -r2.83
*** object.c	2000/07/08 12:06:36	2.82
--- object.c	2000/07/08 17:43:32	2.83
***************
*** 268,272 ****
  		if (PyUnicode_Check(res)) {
  			PyObject* str;
! 			str = PyUnicode_AsEncodedString(res, NULL, NULL);
  			Py_DECREF(res);
  			if (str)
--- 268,272 ----
  		if (PyUnicode_Check(res)) {
  			PyObject* str;
! 			str = PyUnicode_AsUnicodeEscapeString(res);
  			Py_DECREF(res);
  			if (str)