[Python-checkins] python/dist/src/Objects fileobject.c,2.169,2.170

loewis@users.sourceforge.net loewis@users.sourceforge.net
Thu, 21 Nov 2002 15:52:38 -0800


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

Modified Files:
	fileobject.c 
Log Message:
Fix --disable-unicode compilation problems.


Index: fileobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v
retrieving revision 2.169
retrieving revision 2.170
diff -C2 -d -r2.169 -r2.170
*** fileobject.c	3 Oct 2002 05:10:39 -0000	2.169
--- fileobject.c	21 Nov 2002 23:52:35 -0000	2.170
***************
*** 117,123 ****
--- 117,125 ----
  	Py_DECREF(f->f_name);
  	Py_DECREF(f->f_mode);
+ #ifdef Py_USING_UNICODE
  	if (wname)
  		f->f_name = PyUnicode_FromObject(wname);
  	else
+ #endif
  		f->f_name = PyString_FromString(name);
  	f->f_mode = PyString_FromString(mode);
***************
*** 330,333 ****
--- 332,336 ----
  {
  	if (PyUnicode_Check(f->f_name)) {
+ #ifdef Py_USING_UNICODE
  		PyObject *ret = NULL;
  		PyObject *name;
***************
*** 340,343 ****
--- 343,347 ----
  		Py_XDECREF(name);
  		return ret;
+ #endif
  	} else {
  		return PyString_FromFormat("<%s file '%s', mode '%s' at %p>",