summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Changes to make it possible to write multi-threaded programs usingGuido van Rossum1998-05-281-152/+390
| | | | | | | | | | Tkinter. This adds a separate lock -- read the comments. (This was also needed for Mark Hammond's attempts to make PythonWin Tkinter-friendly.) The changes have affected the EventHook slightly, too; and I've done some more cleanup of the code that deals with the different versions of Tcl_CreateFileHandler().
* Protect all uses of the random generator with a lock.Guido van Rossum1998-05-281-8/+24
| | | | Particles break out of their loop when the main loop exits.
* An example of a multi-threaded Tkinter program.Guido van Rossum1998-05-281-0/+44
|
* Patch by Lars Marius Garshol:Guido van Rossum1998-05-281-2/+30
| | | | | | | | | - Handle <? processing instructions >. - Allow . and - in entity names. Also fixed an oversight in the previous fix (in one place, [ \t\r\n] was used instead of string.whitespace).
* Guard against changes in the list size during a compare or sort.Guido van Rossum1998-05-281-22/+31
|
* Some systems (e.g. Linux) use enums for some symbols (like IPPROTO_IP)Guido van Rossum1998-05-281-0/+11
| | | | | | so that our #ifdef test has the wrong effect. Substitute hardcoded values for some important symbols (but not for the whole range -- some are pretty obscure so it's not worth it).
* Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().Guido van Rossum1998-05-281-1/+1
|
* Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().Guido van Rossum1998-05-281-1/+1
|
* For ControlWindow there is a new method do_rawcontrolhit(), which getsJack Jansen1998-05-281-14/+36
| | | | | | | | | control before TrackControl is called. The default implementation calls TrackControl and then do_controlhit(). For ScrolledWindow, do_rawcontrol passes a tracker function to TrackControl if the mouse is in one of the arrows or grey areas, and the tracker handles scrolling. For the thumb part nothing has changed.
* Allow an (optional) tracking function (or -1) to be specified toJack Jansen1998-05-283-41/+166
| | | | | TrackControl. TrackControl is now manually generated (too much work to explain this to bgen).
* get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).Fred Drake1998-05-281-1/+1
|
* t_bootstrap(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).Fred Drake1998-05-281-1/+1
|
* Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred() == ... in twoFred Drake1998-05-281-2/+4
| | | | places.
* add handler for JPython's org.python.core.PyStringMap object, whichJeremy Hylton1998-05-271-0/+7
| | | | walks and quacks like a dictionary.
* Fix some comments; move 'import random' to top.Guido van Rossum1998-05-261-13/+9
|
* On SGI, we need to define _SGI_MP_SOURCE before including errno.h whenGuido van Rossum1998-05-261-0/+4
| | | | we are threading, otherwise accessing errno doesn't work right.
* Tim's quicksort on May 25.Guido van Rossum1998-05-261-123/+141
|
* Add Tim's worst case scenario.Guido van Rossum1998-05-261-6/+11
| | | | Revert to using whrandom so it will work with older versions of Python.
* Added some tests to make sure that long->int conversions nearGuido van Rossum1998-05-261-0/+12
| | | | sys.maxint and near -sys.maxint-1 work correctly.
* Subject: Buglet in PyLong_AsLongGuido van Rossum1998-05-261-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: "Tim Peters" <tim_one@email.msn.com> To: "Guido van Rossum" <guido@CNRI.Reston.VA.US> Date: Sat, 23 May 1998 21:45:53 -0400 Guido, the overflow checking in PyLong_AsLong is off a little: 1) If the C in use sign-extends right shifts on signed longs, there's a spurious overflow error when converting the most-negative int: Python 1.5.1 (#0, Apr 13 1998, 20:22:04) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> x = -1L << 31 >>> x -2147483648L >>> int(x) Traceback (innermost last): File "<stdin>", line 1, in ? OverflowError: long int too long to convert >>> 2) If C does not sign-extend, some genuine overflows won't be caught. The attached should repair both, and, because I installed a new disk and a C compiler today, it's even been compiled this time <wink>. Python 1.5.1 (#0, May 23 1998, 20:24:58) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> x = -1L << 31 >>> x -2147483648L >>> int(x) -2147483648 >>> int(-x) Traceback (innermost last): File "<stdin>", line 1, in ? OverflowError: long int too long to convert >>> int(-x-1) 2147483647 >>> int(x-1) Traceback (innermost last): File "<stdin>", line 1, in ? OverflowError: long int too long to convert >>> end-casing-ly y'rs - tim
* Replaced the VC++ 5.x instructions with a pointer to ../PCbuild.Guido van Rossum1998-05-261-17/+3
|
* Moved VC++ 5.x files to ../PCbuild.Guido van Rossum1998-05-268-1172/+0
|
* Moved VC++ 5.x stuff here.Guido van Rossum1998-05-269-4/+1200
|
* Mark Hammond writes:Guido van Rossum1998-05-261-17/+13
| | | | | | Also, here is a new version of import_nt.c, which allows you to register a Debug module in the registry. While I was there I removed some of the ugliness - what was I thinking :-)
* Don't die if win32api doesn't exist.Guido van Rossum1998-05-261-1/+6
|
* Fix a dumb typo in the revparse() regular exception: {1-4} should be {1,4}.Guido van Rossum1998-05-221-1/+1
| | | | Now you can click on revisions and diffs again!
* Document missing functions: xor, not, truth, countOf, indexOf, andGuido van Rossum1998-05-221-0/+28
| | | | (new!) contains.
* Use a different implementation of EventHook(). The new versionGuido van Rossum1998-05-221-37/+74
| | | | | | | | | | registers an input file handler for stdin with Tcl and handles Tcl events until something is available on stdin; it then deletes the handler and returns from EventHook(). This works with or without GNU readline, and doesn't busy-wait. It still doesn't work for Mac or Windows :-(
* Minor grammatical correction: "This module perform ..." --> "This moduleFred Drake1998-05-221-1/+1
| | | | performs ...".
* Fixed spelling in comment: "RFC", not "RFX".Fred Drake1998-05-221-1/+1
|
* Add an alias (and preferred name) "contains" for "sequenceIncludes".Guido van Rossum1998-05-221-47/+34
| | | | | | | | Rationalized the doc strings. Also simplify the module initialization -- we don't need a __version__ which is set to "$Rev" :-) and we don't need a fatal error when the initialization fails.
* introduce a new platform-specific variable: os.linesep is theGuido van Rossum1998-05-221-0/+5
| | | | | platform's line separator. \n on Unix, \r\n on DOS, OS/2 and Windows, \r on Macs.
* Address some gcc -Wall warnings (e.g. include <ctype.h>).Guido van Rossum1998-05-221-29/+54
| | | | | | | Make sure that no tp_as_numbers->nb_<whatever> function is called without checking for a NULL pointer. Marc-Andre Lemburg will love it! (Except that he's just rewritten all this code for a different approach to coercions ;-( )
* Change the last 4-space indent into a 1-tab indent.Guido van Rossum1998-05-221-1/+1
|
* Shouldn't use newdir.dir(), which no longer exists!Guido van Rossum1998-05-221-2/+1
|
* I think there was a tiny bug in new_function() -- the 'defaults'Guido van Rossum1998-05-221-1/+1
| | | | | argument was initialized to Py_None, but later checked for NULL. Consistently use Py_None.
* Add PyErr_PrintEx and PySequence_Contains.Guido van Rossum1998-05-221-0/+2
|
* Make function objects somewhat mutable -- the members func_code,Guido van Rossum1998-05-221-3/+35
| | | | | | func_defaults and func_doc (alias __doc__) may be assigned to. For the first two, there's a type restriction to code object and tuple, respectively.
* PySequence_In() -> PySequence_Contains().Guido van Rossum1998-05-221-1/+1
|
* Make sure that no use of a function pointer gotten from aGuido van Rossum1998-05-221-3/+5
| | | | | tp_as_sequence or tp_as_mapping structure is made without checking it for NULL first.
* In PyObject_IsTrue(), don't call function pointers that are NULLGuido van Rossum1998-05-221-3/+6
| | | | (nb_nonzero, mp_length, sq_length).
* Moved cmp_member() to abstract.c, as PySequence_Contains() [withGuido van Rossum1998-05-221-53/+2
| | | | | | | | swapped arguments]. Also make sure that no use of a function pointer gotten from a tp_as_sequence or tp_as_mapping structure is made without checking it for NULL first.
* A bunch of functions are now properly implemented in abstract.c, andGuido van Rossum1998-05-221-356/+40
| | | | | | | | | | | the code here becomes much simpler. In particular: abs(), divmod(), pow(), int(), long(), float(), len(), tuple(), list(). Also make sure that no use of a function pointer gotten from a tp_as_sequence or tp_as_mapping structure is made without checking it for NULL first. A few other cosmetic things, such as properly reindenting slice().
* Renamed PySequence_In() to PySequence_Contains().Guido van Rossum1998-05-221-1/+2
|
* Completely reformatted, standardizing indentation as well asGuido van Rossum1998-05-221-582/+900
| | | | | | | | | | | | | | | | programming style. Recoded many routines to incorporate better error checking, and/or better versions of the same function found elsewhere (e.g. bltinmodule.c or ceval.c). In particular, Py_Number_{Int,Long,Float}() now convert from strings, just like the built-in functions int(), long() and float(). Sequences and mappings are now safe to have NULL function pointers anywhere in their tp_as_sequence or tp_as_mapping fields. (A few places in other files need to be checked in too.) Renamed PySequence_In() to PySequence_Contains().
* knownfiles: Add the default installation dirs for ApacheFred Drake1998-05-211-0/+2
| | | | versions <= 1.2, >= 1.3.
* Trivial little change: when setting a member to an object, hold theGuido van Rossum1998-05-201-1/+3
| | | | | | | old value in a temporary and XDECREF it only after then new value has been set. This prevents the (unlikely) case where the destructor of the member uses the containing object -- it would find it in an undefined state.
* Added support for AMK's {definitions} environment; thanks for the reminder!Fred Drake1998-05-201-0/+20
|
* Added {definitions} environment, which has \term to define indivual terms.Fred Drake1998-05-201-0/+11
| | | | Similar to {description}.
* whrandom -> randomGuido van Rossum1998-05-205-12/+12
|