summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Patch #551011: Fix compilation problems with Cygwin.Martin v. Löwis2002-05-081-1/+1
|
* Rename posix_WCONTINUED to posix_WIFCONTINUED, call WIFCONTINUED inside,Martin v. Löwis2002-05-041-2/+5
| | | | add it to the posix_methods.
* Move all data for a single generation into a structure. The set ofNeil Schemenauer2002-05-041-73/+97
| | | | | | | | | | | | generations is now an array. This cleans up some code and makes it easy to change the number of generations. Also, implemented a gc_list_is_empty() function. This makes the logic a little clearer in places. The performance impact of these changes should be negligible. One functional change is that allocation/collection counters are always zeroed at the start of a collection. This should fix SF bug #551915. This change is too big for back-porting but the minimal patch on SF looks good for a bugfix release.
* Indicate delayed initialization of slots. Suggested by tim.one.Martin v. Löwis2002-05-021-3/+5
|
* Patch #551009: Initialize array type dynamically.Martin v. Löwis2002-05-021-3/+6
|
* Guard gettext and friends with HAVE_LIBINTL_H. Fixes #549907.Martin v. Löwis2002-05-021-1/+1
|
* Pickler_clear_memo(): convert to METH_NOARGS.Fred Drake2002-05-011-5/+2
|
* See discussion at SF bug 547537.Guido van Rossum2002-04-291-1/+1
| | | | | | | | | | | Unicode objects are currently taken as binary data by the write() method. This is not what Unicode users expect, nor what the StringIO.py code does. Until somebody adds a way to specify binary or text mode for cStringIO objects, change the format string to use "t#" instead of "s#", so that it will request the "text buffer" version. This will try the default encoding for Unicode objects. This is *not* a 2.2 bugfix (since it *is* a semantic change).
* _PyObject_GC_New: Could call PyObject_INIT with a NULL 1st argument.Tim Peters2002-04-281-2/+6
| | | | | | _PyObject_GC_NewVar: Could call PyObject_INIT_VAR likewise. Bugfix candidate.
* Repair widespread misuse of _PyString_Resize. Since it's clear peopleTim Peters2002-04-279-55/+23
| | | | | | | | | | | | | | | | | | | | | | don't understand how this function works, also beefed up the docs. The most common usage error is of this form (often spread out across gotos): if (_PyString_Resize(&s, n) < 0) { Py_DECREF(s); s = NULL; goto outtahere; } The error is that if _PyString_Resize runs out of memory, it automatically decrefs the input string object s (which also deallocates it, since its refcount must be 1 upon entry), and sets s to NULL. So if the "if" branch ever triggers, it's an error to call Py_DECREF(s): s is already NULL! A correct way to write the above is the simpler (and intended) if (_PyString_Resize(&s, n) < 0) goto outtahere; Bugfix candidate.
* Check for overflow errors in setrlimit(),Jeremy Hylton2002-04-231-1/+10
| | | | and reflow a long line.
* WCOREDUMP(), WIFCONTINUED(), WCONTINUED, WUNTRACED: New.Fred Drake2002-04-231-11/+75
| | | | | isatty(), WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(): Changed to return bools instead of ints.
* SF patch [ 545523 ] patch for 514433 bsddb.dbopen (NULL)Anthony Baxter2002-04-231-3/+3
| | | | | | | | | | | | closes SF #514433 can now pass 'None' as the filename for the bsddb.*open functions, and you'll get an in-memory temporary store. docs are ripped out of the bsddb dbopen man page. Fred may want to clean them up. Considering this for 2.2, but not 2.1.
* #546156, Remove load_false()/load_true(), they are not usedNeal Norwitz2002-04-211-14/+0
|
* #544265, Remove warnings for passing const to free()Neal Norwitz2002-04-211-1/+1
|
* #546163, fix link problem on Solaris 8 for makedev when using mknodNeal Norwitz2002-04-201-0/+3
|
* Forward port of patch # 500311: Work around for buggy https servers.Martin v. Löwis2002-04-201-24/+72
| | | | Fixes #494762.
* Patch #546194: Check constants individually. Fixes 534143 on OpenBSD.Martin v. Löwis2002-04-191-2/+19
| | | | Will backport to 2.2.
* #546155, remove posix_int() it is not usedNeal Norwitz2002-04-191-16/+0
|
* Fix SF #544995 (zlib crash on second flush call)Jeremy Hylton2002-04-191-0/+1
| | | | | | Bug fix by mhammond. Bug fix candidate for 2.2, not present in 2.1.
* Document the build process more precisely. Suggested by Hugh Sasse.Martin v. Löwis2002-04-191-3/+15
|
* posix_fildes(): New helper: run a function that takes a file descriptorFred Drake2002-04-151-52/+71
| | | | | | | | | | | | | | | | | | and returns None. This allows any object that supports the fileno() method to be passed as a file descriptor, not just an integer. posix_fchdir(): New exposed function: implements posix.fchdir(). This closes SF feature #536796. posix_fsync(), posix_fdatasync(): Convert to use posix_fildes() instead of posix_int(). This also changes them from METH_VARARGS to METH_O functions. setup_confname_table(): Remove unused variable. Change to take a module rather than a dict to save the resulting table into. setup_confname_tables(): Change to take a module instead of a dict to pass to setup_confname_table().
* Remove unused variable reported by Walter DörwaldNeal Norwitz2002-04-151-1/+1
|
* Patch #543447: Add posix.mknod.Martin v. Löwis2002-04-141-4/+40
|
* initpwd(): Clean up initialization, avoid PyModule_GetDict().Fred Drake2002-04-131-4/+4
|
* First stab at rationalizing the PyMem_ API. Mixing PyObject_xyz withTim Peters2002-04-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | PyMem_{Del, DEL} doesn't work yet (compilation problems). pyport.h: _PyMem_EXTRA is gone. pmem.h: Repaired comments. PyMem_{Malloc, MALLOC} and PyMem_{Realloc, REALLOC} now make the same x-platform guarantees when asking for 0 bytes, and when passing a NULL pointer to the latter. object.c: PyMem_{Malloc, Realloc} just call their macro versions now, since the latter take care of the x-platform 0 and NULL stuff by themselves now. pypcre.c, grow_stack(): So sue me. On two lines, this called PyMem_RESIZE to grow a "const" area. It's not legit to realloc a const area, so the compiler warned given the new expansion of PyMem_RESIZE. It would have gotten the same warning before if it had used PyMem_Resize() instead; the older macro version, but not the function version, silently cast away the constness. IMO that was a wrong thing to do, and the docs say the macro versions of PyMem_xyz are deprecated anyway. If somebody else is resizing const areas with the macro spelling, they'll get a warning when they recompile now too.
* PyObject_Del can now be used as a function designator.Neil Schemenauer2002-04-122-2/+2
|
* Allow PyObject_Del to be used as a function designator. Provide binaryNeil Schemenauer2002-04-121-14/+39
| | | | | | | | compatibility function. Make PyObject_GC_Track and PyObject_GC_UnTrack functions instead of trivial macros wrapping functions. Provide binary compatibility functions.
* Got rid of ifdefs for long-obsolete GUSI versions.Jack Jansen2002-04-112-31/+0
|
* Fix an obvious bug.Thomas Heller2002-04-091-2/+2
|
* Patch #512005: getrusage() returns struct-like object.Martin v. Löwis2002-04-081-23/+70
|
* Lock methods acquire() and locked() now return bools.Guido van Rossum2002-04-071-7/+7
|
* Implement an idea by Paul Rubin:Guido van Rossum2002-04-051-15/+11
| | | | | | | | Change pickling format for bools to use a backwards compatible encoding. This means you can pickle True or False on Python 2.3 and Python 2.2 or before will read it back as 1 or 0. The code used for pickling bools before would create pickles that could not be read in previous Python versions.
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-3/+3
|
* Removed old Digital Creations copyright/license notices (withGuido van Rossum2002-04-044-161/+1
| | | | | permission from Paul Everitt). Also removed a few other references to Digital Creations and changed the remaining ones to Zope Corporation.
* Add the 'bool' type and its values 'False' and 'True', as described inGuido van Rossum2002-04-032-7/+57
| | | | | | | | | | | | | PEP 285. Everything described in the PEP is here, and there is even some documentation. I had to fix 12 unit tests; all but one of these were printing Boolean outcomes that changed from 0/1 to False/True. (The exception is test_unicode.py, which did a type(x) == type(y) style comparison. I could've fixed that with a single line using issubtype(x, type(y)), but instead chose to be explicit about those places where a bool is expected. Still to do: perhaps more documentation; change standard library modules to return False/True from predicates.
* Remove direct manipulation of the module dict.Fred Drake2002-04-031-9/+3
|
* Fix bugs:Mark Hammond2002-04-031-1/+7
| | | | | | | | | | | | | | | 457466: popenx() argument mangling hangs python 226766: popen('python -c"...."') tends to hang Fixes argument quoting in w9xpopen.exe for Windows 9x. w9xpopen.exe also never attempts to display a MessageBox when not executed interactively. Added test_popen() test. This test currently just executes "python -c ..." as a child process, and checks that the expected arguments were all recieved correctly by the child process. This test succeeds for me on Win9x, win2k and Linux, and I hope it does for other popen supported platforms too :)
* Convert more METH_OLDARGS & PyArg_Parse()Neal Norwitz2002-04-023-69/+69
| | | | Please review.
* Get rid of more PyArg_Parse & METH_OLDARGS.Neal Norwitz2002-04-022-13/+14
| | | | | PyArg_Parse( "s" ) -> PyString_AsString PyArg_Parse( "t#" ) -> PyString_AsStringAndSize
* Reindent. Break long lines. Move comments before the statements.Martin v. Löwis2002-04-011-3482/+3641
|
* Use the PyModule_Add*() APIs instead of manipulating the module dictFred Drake2002-04-015-283/+280
| | | | directly.
* Remove all but one use of the module dict.Fred Drake2002-04-011-44/+38
|
* Remove unused variable and call to PyModule_GetDict().Fred Drake2002-04-011-2/+1
|
* Switch to using METH_NOARGS where possible.Fred Drake2002-04-011-38/+18
| | | | Convert to use PyModule_*() instead of manipulating the module dict directly.
* Remove UNLESS.Martin v. Löwis2002-04-011-152/+152
|
* Use the PyModule_*() API instead of manipulating the module dictionaryFred Drake2002-04-012-11/+11
| | | | directly.
* Get rid of all METH_OLDARGS & PyArg_Parse.Neal Norwitz2002-04-011-43/+35
| | | | | Fix floating point exception if mpz.powm(10, 1, 0) (modulus == 0). Add a test.
* mpz_float() only takes one parameter nowNeal Norwitz2002-03-311-5/+0
|
* Get rid of warnings due to changing to METH_NOARGSNeal Norwitz2002-03-311-5/+5
|