[Python-checkins] python/dist/src/Objects stringobject.c,2.161,2.162

doerwalter@sourceforge.net doerwalter@sourceforge.net
Mon, 13 May 2002 02:00:46 -0700


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

Modified Files:
	stringobject.c 
Log Message:
Add #ifdef PY_USING_UNICODE sections, so that
stringobject.c compiles again with --disable-unicode.

Fixes SF bug http://www.python.org/sf/554912


Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.161
retrieving revision 2.162
diff -C2 -d -r2.161 -r2.162
*** stringobject.c	27 Apr 2002 18:44:32 -0000	2.161
--- stringobject.c	13 May 2002 09:00:41 -0000	2.162
***************
*** 1458,1461 ****
--- 1458,1462 ----
  		if (PyString_Check(sep))
  			return do_xstrip(self, striptype, sep);
+ #ifdef Py_USING_UNICODE
  		else if (PyUnicode_Check(sep)) {
  			PyObject *uniself = PyUnicode_FromObject((PyObject *)self);
***************
*** 1468,1474 ****
--- 1469,1480 ----
  			return res;
  		}
+ #endif
  		else {
  			PyErr_Format(PyExc_TypeError,
+ #ifdef Py_USING_UNICODE
  				     "%s arg must be None, str or unicode",
+ #else
+ 				     "%s arg must be None or str",
+ #endif
  				     STRIPNAME(striptype));
  			return NULL;