summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Patch by Nick and Stephanie Lockwood to implement complex() with a stringGuido van Rossum1999-03-251-4/+133
| | | | argument. This closes TODO item 2.19.
* New builtin buffer() creates a derived read-only buffer from anyGuido van Rossum1999-03-191-0/+24
| | | | object that supports the buffer interface (e.g. strings, arrays).
* Rob Riggs wrote:Guido van Rossum1999-03-151-2/+2
| | | | | | | | | | | | | | | """ Spec says that on success pthread_create returns 0. It does not say that an error code will be < 0. Linux glibc2 pthread_create() returns ENOMEM (12) when one exceed process limits. (It looks like it should return EAGAIN, but that's another story.) For reference, see: http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html """ [I have a feeling that similar bugs were fixed before; perhaps someone could check that all error checks no check for != 0?]
* Always test for an error return (usually NULL or -1) without settingGuido van Rossum1999-03-091-3/+4
| | | | an exception.
* (initerrors): Make sure that the exception tuples ("base-classes" whenBarry Warsaw1999-02-241-8/+18
| | | | | string-based exceptions are used) reflect the real class hierarchy, i.e. that SystemExit derives from Exception not StandardError.
* Patch by Tim Peters to improve the range checks for range() andGuido van Rossum1999-02-231-30/+48
| | | | | | | xrange(), especially for platforms where int and long are different sizes (so sys.maxint isn't actually the theoretical limit for the length of a list, but the largest C int is -- sys.maxint is the largest Python int, which is actually a C long).
* Patch by Tommy Burnette to accept an arbitrary sequence when "(...)"Guido van Rossum1999-02-171-7/+10
| | | | | is used in the format string, instead of requiring a tuple. This is in line with the general trend towards accepting arbitrary sequences.
* initmain(): Nailed a memory leak. bimod must be DECREF'd!Barry Warsaw1999-01-291-0/+1
|
* bltin_exc[]: EnvironmentError is not a "leaf exception", so set it'sBarry Warsaw1999-01-291-1/+1
| | | | leaf_exc flag to zero otherwise the name leaks memory.
* builtin_map(): A better fix for the previous leak plug (rememberBarry Warsaw1999-01-281-3/+6
| | | | | | PyList_Append steals a reference even if it fails). builtin_filter(): Had the same leak problem as builtin_map().
* Implement -OO; "unsafe" optimization that removes docstrings.Guido van Rossum1999-01-281-0/+3
| | | | Marc-Andre Lemburg.
* builtin_map(): Nailed memory leak. PyList_Append() borrows aBarry Warsaw1999-01-281-0/+1
| | | | | reference, so you have to DECREF the appended value. This was a fun one!
* builtin_complex(): Nailed memory leak. This one's in the instanceBarry Warsaw1999-01-271-0/+1
| | | | | | test for classes with a __complex__() method. The attribute is pulled out of the instance with PyObject_GetAttr() but this transfers ownership and the function object was never DECREF'd.
* PyImport_ReloadModule(): Nailed a small memory leak. In theBarry Warsaw1999-01-271-0/+1
| | | | | else-clause of the subname test, the parentname object was never DECREF'd.
* Patches by William Lewis for Nextstep descendants.Guido van Rossum1999-01-273-11/+74
|
* err_input(): Nailed a small memory leak. If the error is E_INTR, theBarry Warsaw1999-01-271-1/+2
| | | | | | | | | v temporary variable was never decref'd. Test this by starting up the interpreter, hitting C-c, then immediately exiting. Same potential leak can occur if error is E_NOMEM, since the return is done in the case block. Added Py_XDECREF(v); to both blocks, just before the return.
* _PySys_Init(): Nailed small memory leak. The stringobject created forBarry Warsaw1999-01-271-0/+1
| | | | sys.version was missing a Py_XDECREF().
* Change rare occurrences of #if HAVE_LONG_LONG to #ifdef.Guido van Rossum1999-01-252-3/+3
|
* Jim Ahlstrom patch: the module doc string is too long for 16-bit VCGuido van Rossum1999-01-141-1/+5
| | | | 1.5. Omit the second part.
* Avoid overflow if possible in calculations for range(); reportGuido van Rossum1999-01-121-7/+28
| | | | unavoidable overflow as OverflowError.
* Hack for Windows so that if (1) the exit status is nonzero and (2) weGuido van Rossum1999-01-081-0/+47
| | | | | | | | | think we have our own DOS box (i.e. we're not started from a command line shell), we print a message and wait for the user to hit a key before the DOS box is closed. The hacky heuristic for determining whether we have our *own* DOS box (due to Mark Hammond) is to test whether we're on line zero...
* Ty Sarna writes:Guido van Rossum1999-01-071-1/+1
| | | | | | | | | The following patches (relative to 1.5.2b1) enable Python dynamic loading to work on NetBSD platforms that use ELF (presnetly mips and alpha systems). They automaticly determine wether the system is ELF or a.out rather than using astatic list of platforms so that when other NetBSD platforms move to ELF, python will continue to work without change.
* Chris Herborth writes:Guido van Rossum1999-01-041-38/+4
| | | | Donn Cave tells me the PyImport_BeImageID() function isn't needed anymore.
* Add sys.hexversion, which is an integer encoding the version in hexadecimal.Guido van Rossum1999-01-031-0/+2
| | | | | | In other words, hex(sys.hexversion) == 0x010502b2 for Python 1.5.2b2. This is derived from the new variable PY_VERSION_HEX defined in patchlevel.h. (Cute, eh?)
* Use PY_VERSION instead of PATCHLEVEL.Guido van Rossum1999-01-031-1/+2
|
* Call PyInitFrozenExtensions() as requested by Mark Hammond (his patch).Guido van Rossum1999-01-021-0/+4
|
* Oops, forgot a pair of {}'s. (Greg Couch)Guido van Rossum1998-12-231-1/+2
|
* Add 'N' format character to Py_BuildValue -- like 'O' but doesn't INCREF.Guido van Rossum1998-12-231-1/+3
| | | | Patch and suggestion by Greg Couch.
* Improve comment for PyImport_Import() as suggested by Bill Tutt.Guido van Rossum1998-12-211-1/+4
|
* Thanks to Chris Herborth, the thread primitives now have proper Py*Guido van Rossum1998-12-2113-412/+412
| | | | | names in the source code (they already had those for the linker, through some smart macros; but the source still had the old, un-Py names).
* Use PyThreadState_GET() macro.Guido van Rossum1998-12-212-2/+2
|
* Make current_tstate a global, _PyThreadState_Current. This is toGuido van Rossum1998-12-211-10/+10
| | | | support a macro in pystate.h.
* Chris H. writes:Guido van Rossum1998-12-181-1/+1
| | | | | If we're going to put the PyOS_strtol() proto in intobject.h we should include it here or the symbol isn't exported on PowerPC.
* Patch by Chris Herborth:Guido van Rossum1998-12-171-0/+4
| | | | have to use a const-correct prototype on BeOS or the compiler gets uppity.
* Move the prototype for dump_counts() to before where it is used.Guido van Rossum1998-12-151-4/+4
| | | | (This only applies when COUNT_ALLOCS is defined.)
* Remove prototypes for PyOS_strto[u]l -- Chris Herborth.Guido van Rossum1998-12-101-3/+0
|
* Add more SET_LINENO instructions in long argument listsGuido van Rossum1998-12-101-1/+7
|
* Adding thread support for BeOS by Chris Herborth.Guido van Rossum1998-12-071-0/+388
|
* Use PyInt_AS_LONG macro instead of explicit inlining.Guido van Rossum1998-12-041-6/+6
|
* Need to add default decl of DL_IMPORT, for mymalloc.hGuido van Rossum1998-12-041-0/+5
|
* Added new builtin standard exception: NotImplementedError (its CBarry Warsaw1998-12-011-0/+2
| | | | counterpart is PyExc_NotImplementedError).
* Fix cosmetic bug in delattr docstring discovered by JvR.Guido van Rossum1998-11-231-1/+1
|
* Whoops! One the "redundant" initializations removed by Vladimir inGuido van Rossum1998-11-231-2/+2
| | | | | the previous patch wasn't -- there was a path through the code that bypassed all initializations. Thanks to Just for reporting the bug!
* Remove some redundant initializations -- patch by Vladimir Marangozov.Guido van Rossum1998-11-171-4/+4
|
* Jim Fulton writes:Guido van Rossum1998-10-221-0/+1
| | | | | | | | """ I had originally not realized that PyEval_GetGlobals did not INCREF it's return value. The fix is to add the INCREF, as shown below. """
* When errno is zero, avoid calling strerror() and use "Error" for theGuido van Rossum1998-10-141-2/+7
| | | | message.
* Replace fprintf(stderr, ...) with PySys_WriteStderr(...).Guido van Rossum1998-10-122-23/+23
|
* Patches for mywrite() by Marc Lemburg: save/restore the error stateGuido van Rossum1998-10-121-3/+6
| | | | reliably; check return value of vsprintf().
* Implement new format character 't#'. This is like s#, accepting anGuido van Rossum1998-10-081-0/+25
| | | | | object that implements the buffer interface, but requires a buffer that contains 8-bit character data. Greg Stein.
* The previous checkin contained an experiment of Greg Stein's that wasn'tGuido van Rossum1998-10-081-1/+1
| | | | meant for checkin, and which broke marshal.loads().