summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Peter Schneider-Kamp <nowonder@nowonder.de>:Fred Drake2000-08-311-7/+3
| | | | | | Remove some of GCC's warning in -Wstrict-prototypes mode. This closes SourceForge patch #101342.
* Fixed a serious typo.Marc-André Lemburg2000-08-251-1/+1
|
* Fix to bug [ Bug #111860 ] file.writelines() crashes.Marc-André Lemburg2000-08-251-9/+34
| | | | | | | file.writelines() now tries to emulate the behaviour of file.write() as closely as possible. Due to the problems with releasing the interpreter lock the solution isn't exactly optimal, but still better than not supporting the file.write() semantics at all.
* Added include for limits.hJack Jansen2000-08-221-0/+4
|
* Add largefile support for Linux64 and WIn64. Add test_largefile and some minorTrent Mick2000-08-111-37/+145
| | | | | | | | | | change to regrtest.py to allow optional running of test_largefile ('cause it's slow on Win64). This closes patches: http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100510&group_id=5470 and http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100511&group_id=5470
* Added PyObject_AsFileDescriptor, which checks for integer, long integer,Andrew M. Kuchling2000-07-131-0/+58
| | | | or .fileno() method
* ANSI-fication of the sources.Fred Drake2000-07-091-85/+30
|
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-3/+3
|
* Fix to bug #389:Marc-André Lemburg2000-07-051-4/+4
| | | | | | | Full_Name: Bastian Kleineidam Version: 2.0b1 CVS 5.7.2000 OS: Debian Linux 2.2 Submission from: earth.cs.uni-sb.de (134.96.252.92)
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The common technique for printing out a pointer has been to cast to a long and use the "%lx" printf modifier. This is incorrect on Win64 where casting to a long truncates the pointer. The "%p" formatter should be used instead. The problem as stated by Tim: > Unfortunately, the C committee refused to define what %p conversion "looks > like" -- they explicitly allowed it to be implementation-defined. Older > versions of Microsoft C even stuck a colon in the middle of the address (in > the days of segment+offset addressing)! The result is that the hex value of a pointer will maybe/maybe not have a 0x prepended to it. Notes on the patch: There are two main classes of changes: - in the various repr() functions that print out pointers - debugging printf's in the various thread_*.h files (these are why the patch is large) Closes SourceForge patch #100505.
* Jack Jansen: Moved includes to the top, removed think C supportGuido van Rossum2000-06-281-18/+20
|
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-1/+1
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* Checking in the new, improve file.writelines() code.Guido van Rossum2000-03-131-24/+78
| | | | | | This (1) avoids thread unsafety whereby another thread could zap the list while we were using it, and (2) now supports writing arbitrary sequences of strings.
* Many changes for Unicode, by Marc-Andre Lemburg.Guido van Rossum2000-03-101-1/+7
|
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-291-5/+5
| | | | PyArg_ParseTuple() format string arguments as possible.
* Patch by Mark Hammond to avoid certain header files on Windows/CE.Guido van Rossum1999-08-271-1/+10
|
* casts for picky compilers.Guido van Rossum1999-04-101-1/+1
|
* Jim Ahlstrom patch: BIGCHUNK is too large for 16-bit int.Guido van Rossum1999-01-141-1/+5
|
* Need to include <sys/types.h> for off_t.Guido van Rossum1999-01-071-0/+2
|
* Changes for long file support by Steve Clift.Guido van Rossum1999-01-061-11/+53
| | | | (This also redoes my previous patch, but better.)
* Fix two places (seek and truncate) where a cascade of PyArg_ParseGuido van Rossum1999-01-041-11/+9
| | | | | calls was used instead of a single PyArg_ParseTuple call with an optional argument.
* As noted by Per Cederqvist, new_buffersize() sometimes returns theGuido van Rossum1998-12-111-2/+11
| | | | | | | buffer increment, and sometimes the new buffer size. Make it do what its name says, and fix the one place where this matters to the caller. Also add a comment explaining why we call lseek() and then ftell().
* PyFile_FromString(): If an exception occurs, pass in the filename thatBarry Warsaw1998-07-231-1/+2
| | | | | was used so it's reflected in the IOError. Call PyErr_SetFromErrnoWithFilename().
* Ugly band-aid to work around a bug in Linux ftell().Guido van Rossum1998-05-051-1/+3
|
* Enable ftruncate() on the Mac.Guido van Rossum1998-04-281-0/+6
| | | | (Jack)
* Clear the error condition set by ftell().Guido van Rossum1998-04-271-0/+2
|
* Make new gcc -Wall happyGuido van Rossum1998-04-101-3/+6
|
* Subtle fix in the read() code which could cause a read broken up inGuido van Rossum1998-03-181-1/+1
| | | | several pieces to fail...
* When we have no setvbuf(), make the file totally unbuffered usingGuido van Rossum1998-03-061-1/+4
| | | | setbuf() if a buffer size of 0 or 1 byte is requested.
* Of course, I shouldn't have used lseek() to find out the file'sGuido van Rossum1998-03-031-6/+3
| | | | | position in new_buffersize(); the correct function to use is ftell(). Thanks to Ben Jackson.
* Check ferror(), not errno, for fread() error.Guido van Rossum1998-02-191-1/+1
|
* Fix problem discovered by Barry: if you hit ^C toGuido van Rossum1997-11-071-2/+2
| | | | | | | sys.stdin.readline(), you get a fatal error (no current thread). This is because there was a call to PyErr_CheckSignals() while there was no current thread. I wonder how many more of these we find... I bnetter go hunting for PyErr_CheckSignals() now...
* Use lseek instead of ftell; compensate by adding BUFSIZEGuido van Rossum1997-08-211-2/+6
|
* Reordered list of methods to hopefully put the most frequently usedGuido van Rossum1997-07-131-8/+10
| | | | | | ones near the front. Also added a missing "return -1" to PyFile_WriteString.
* PyFile_WriteString now returns an error indicator instead of callingGuido van Rossum1997-05-221-12/+18
| | | | PyErr_Clear().
* Fix typo in error checking spotted by Just...Guido van Rossum1997-05-221-1/+1
|
* Add optional 'sizehint' argument to readlines(). After approximatelyGuido van Rossum1997-05-101-23/+33
| | | | | | | | | | | | this many bytes have been read, readlines stops. Because of buffering, the amount of bytes read is usually at least 8K more than the hint. Also changed read() and readline() to use PyArg_ParseTuple(). (Note that the *previous* checkin also fixed error handling and narrowed the range of thread unblocking for all methods using fread().)
* Rewrite readlines() to speed it up -- about a factor of 2 on myGuido van Rossum1997-05-101-25/+89
| | | | Indigo2, reading a 9Meg file from the local disk.
* Speed up read() (i.e. read till EOF) considerably by doing a stat() toGuido van Rossum1997-05-091-15/+65
| | | | | | see if we can guess the #bytes until the end of the file. If we can't, increment the buffer size increments up to 0.5Meg to avoid realloc'ing too much.
* Fix by Mark Hammond to enable truncate() on Windows.Guido van Rossum1997-05-061-0/+6
|
* Checkin of Jack's buffer mods.Guido van Rossum1997-05-051-0/+36
| | | | Not really checked, but didn't fail any tests either...
* Quickly renamed the last directory.Guido van Rossum1997-05-021-295/+296
|
* Make gcc -Wall happy.Guido van Rossum1996-12-051-0/+4
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* fix read(0), readline(0); make tuple for call_object argsGuido van Rossum1995-07-101-14/+17
|
* MW does not always set errno on failing fopen()Jack Jansen1995-04-231-0/+11
|
* explicitly init flags in methodlistsGuido van Rossum1995-02-191-12/+16
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | floatobject.c: fix hash(). methodobject.c: support METH_FREENAME flag bit.