[Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.140,2.141

Jack Jansen jackjansen@users.sourceforge.net
Fri, 30 Nov 2001 06:16:38 -0800


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

Modified Files:
	fileobject.c 
Log Message:
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
changes from start of branch upto r22b2 were already merged, of course).


Index: fileobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v
retrieving revision 2.140
retrieving revision 2.141
diff -C2 -d -r2.140 -r2.141
*** fileobject.c	2001/11/28 22:13:25	2.140
--- fileobject.c	2001/11/30 14:16:36	2.141
***************
*** 122,128 ****
  	if (f->f_fp == NULL) {
  #ifdef NO_FOPEN_ERRNO
! 		/* Metroworks only, not testable, so unchanged */
  		if (errno == 0) {
! 			PyErr_SetString(PyExc_IOError, "Cannot open file");
  			return NULL;
  		}
--- 122,133 ----
  	if (f->f_fp == NULL) {
  #ifdef NO_FOPEN_ERRNO
! 		/* Metroworks only, wich does not always sets errno */
  		if (errno == 0) {
! 			PyObject *v;
! 			v = Py_BuildValue("(is)", 0, "Cannot open file");
! 			if (v != NULL) {
! 				PyErr_SetObject(PyExc_IOError, v);
! 				Py_DECREF(v);
! 			}
  			return NULL;
  		}