[Python-checkins] python/dist/src/Modules posixmodule.c,2.216.4.7,2.216.4.8

mwh@users.sourceforge.net mwh@users.sourceforge.net
Fri, 23 Aug 2002 09:27:43 -0700


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

Modified Files:
      Tag: release22-maint
	posixmodule.c 
Log Message:
backport gvanrossum's checkin of
    revision 2.234 of posixmodule.c

SF bug 563750 (Alex Martelli): posix_tmpfile():

The file returned by tmpfile() has mode w+b, so use that in the call
to PyFile_FromFile().

Bugfix candidate.


Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.216.4.7
retrieving revision 2.216.4.8
diff -C2 -d -r2.216.4.7 -r2.216.4.8
*** posixmodule.c	19 Aug 2002 00:43:06 -0000	2.216.4.7
--- posixmodule.c	23 Aug 2002 16:27:40 -0000	2.216.4.8
***************
*** 4479,4483 ****
      if (fp == NULL)
          return posix_error();
!     return PyFile_FromFile(fp, "<tmpfile>", "w+", fclose);
  }
  #endif
--- 4479,4483 ----
      if (fp == NULL)
          return posix_error();
!     return PyFile_FromFile(fp, "<tmpfile>", "w+b", fclose);
  }
  #endif