summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Marc-Andre Lemburg's patch to support instance methods with otherGuido van Rossum1998-07-081-3/+15
| | | | callable objects than regular Pythonm functions as their im_func.
* Add a cast that a picky SGI compiler found was necessary.Guido van Rossum1998-07-071-1/+1
|
* Fix a benign problem found by a picky SGI compiler (unreachable breakGuido van Rossum1998-07-071-1/+0
| | | | after a return).
* Fix benign problems found by a picky SGI compiler (unreachable breakGuido van Rossum1998-07-071-2/+0
| | | | after a return or goto).
* Fix benign problems found by a picky SGI compiler (unreachable breakGuido van Rossum1998-07-072-20/+0
| | | | after a return).
* Fix some problems that a picky SGI compiler reported. Two were benignGuido van Rossum1998-07-071-3/+1
| | | | | (unreachable break after a return) but one was a real bug: ReadFrames() was getting a bogus framecount because of a missing '&'.
* Added copious docstrings, plus two minor layout tweaks.Guido van Rossum1998-07-071-39/+309
|
* On Windows, put the select file descriptor arrays on the heap.Guido van Rossum1998-07-021-0/+22
| | | | | This is because they are huge and the stack is limited on Windows. Other platforms keep declaring it on the stack.
* Unsigned 1 and 2 byte sized formats shouldn't result in long integer values!Guido van Rossum1998-06-291-2/+8
|
* # Added missing semicolon (was #ifdef'ed out in edit on Windows).Guido van Rossum1998-06-281-1/+1
|
* Added doc strings.Guido van Rossum1998-06-282-10/+98
|
* Added doc strings.Guido van Rossum1998-06-271-11/+114
|
* # Remove an extra blank line from a doc string.Guido van Rossum1998-06-271-1/+0
|
* Added doc strings. Also export LockType from the modoule, and give itGuido van Rossum1998-06-271-15/+102
| | | | a doc string.
* Added <ctype.h>, needed for Windows.Guido van Rossum1998-06-191-0/+1
|
* There was an error check in a loop in PythonCmd which calledGuido van Rossum1998-06-191-1/+1
| | | | | | | PythonCmd_Error() but failed to return. The error wasn't very likely (only when we run out of memory) but since the check is there we might as well return the error. (I think that Barry introduced this buglet when he added error checks everywhere.)
* # Note: a previous checkin message was lost because I can now use CVSGuido van Rossum1998-06-151-36/+7
| | | | | | | | | # from my PC at home, but it can't send email :-( Add a clarifying comment about the new ENTER_OVERLAP and LEAVE_OVERLAP_TCL macros; get rid of all the bogus tests for deleted interpreters (Tcl already tests for this; they were left over from an earlier misguided attempt to fix the threading).
* # (My first checkin from Windows NT using remote CVS!)Guido van Rossum1998-06-151-52/+134
| | | | | | | | | | | | | | | | | | | | There were some serious problem with the thread-safety code. The basic problem was that often the result was gotten out of the Tcl interpreter object after releasing the Tcl lock. Of course, another thread might have changed the return value already, and this was indeed happening. (Amazing what trying it on a different thread implementation does!) The solution is to grab the Python lock without releasing the Tcl lock, so it's safe to create a string object or set the exceptions from the Tcl interpreter. Once that's done, the Tcl lock is released. Note that it's now legal to acquire the Python lock while the the Tcl lock is held; but the reverse is not true: the Python lock must be released before the Tcl lock is acquired. This in order to avoid deadlines. Fortunately, there don't seem to be any problems with this.
* Fixed the EventHook() code so that it also works on Windows, sort of.Guido van Rossum1998-06-131-6/+26
| | | | | | | | | | | | | (The "sort of" is because it uses kbhit() to detect that the user starts typing, and then no events are processed until they hit return.) Also fixed a nasty locking bug: EventHook() is called without the Tcl lock set, so it can't use the ENTER_PYTHON and LEAVE_PYTHON macros, which manipulate both the Python and the Tcl lock. I now only acquire and release the Python lock. (Haven't tested this on Unix yet...)
* On Windows, make the pipe() call return Unix file descriptors insteadGuido van Rossum1998-06-121-2/+5
| | | | | of Windows file handles. Now it is at least compatible with itself on Unix!
* In tcsetattr(), first initialize the mode structure by callingGuido van Rossum1998-06-121-0/+3
| | | | | tcgetattr(). This seems to be the only correct way to cope with platform-specific structure members...
* Added strptime, if it exists. Modified after a patch by Jesse Hallio.Guido van Rossum1998-06-091-10/+53
|
* Sorry, the initializer for ob_type must really be NULL,Guido van Rossum1998-05-291-1/+1
| | | | else the damn thing won't compile on Windows :-(
* On Windows, need #include <windows.h>; and it's MS_WINDOWS, not MS_WIN32.Guido van Rossum1998-05-291-2/+6
|
* 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().
* 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).
* 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.
* 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 :-(
* 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.
* 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.
* 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.
* Correct bug doc string (discovered by Berthold Hoellmann):Guido van Rossum1998-05-201-1/+1
| | | | get_line_buffer() does not take an optional argument.
* When a .o file is an absolute pathname, assume it's a file for whichGuido van Rossum1998-05-141-0/+1
| | | | we have no .c source.
* strop_replace(): balk if the pattern string is empty.Guido van Rossum1998-05-141-0/+4
|
* whichmodule(): remove redundant PyErr_Clear(); add explicit settingGuido van Rossum1998-05-141-4/+3
| | | | of error when sys.modules isn't there.
* Don't delete glmodule.c on 'make clobber' (it's a checked in file!).Guido van Rossum1998-05-141-1/+1
|
* Replace all calls to fprintf(stderr, ...) with calls to PySys_WriteStderr(...).Guido van Rossum1998-05-121-7/+7
|
* Trivial little change: timer tokens shouldn't have a Print() function,Guido van Rossum1998-05-121-8/+7
| | | | they should have a Repr() function.
* parser_compare_nodes(): Corrected a minor type error; eliminate one GCCFred Drake1998-05-111-1/+1
| | | | warning (at least under Linux).
* Fix by Sean Reifschneider:Guido van Rossum1998-05-081-25/+38
| | | | | | | - When facility not specified to syslog() method, use default from openlog() (This is how it was claimed to work in the documentation) - Potential resource leak of o_ident, now cleaned up in closelog() - Minor comment accuracy fix.
* Added URLs for zlib's home page and the Windows DLL's home page .Guido van Rossum1998-05-081-0/+2
|
* AMK's revised version of the previous patch.Guido van Rossum1998-05-073-11/+29
|
* Use (void) to throw away a function result, not (void *) !Guido van Rossum1998-05-011-1/+1
|
* When following symlinks to the real executable, use a loop so aGuido van Rossum1998-04-291-1/+2
| | | | | symlink to a symlink can work. (Jack)
* Still somewhat experimental speedup. This appears to speed up theGuido van Rossum1998-04-291-9/+110
| | | | | | | | | | | | | | most common interface to Tcl, the call() method, by maybe 20-25%. The speedup code avoids the construction of a Tcl command string from the argument list -- the Tcl argument list is immediately parsed back by Tcl_Eval() into a list that is *guaranteed* (by Tcl_Merge()) to be exactly the same list, so instead we look up the command info and call the command function directly. If the lookup fails, we fall back to the old method (Tcl_Merge() + Tcl_Eval()) so we don't need to worry about special cases like undefined commands or the occasional command ("after") that sets the info.proc pointer to NULL -- let TclEval() deal with these.
* Add a new method of interpreter objects, interpaddr(). This returnsGuido van Rossum1998-04-291-0/+13
| | | | | | | | the address of the Tcl interpreter object, as an integer. Not very useful for the Python programmer, but this can be called by another C extension that needs to make calls into the Tcl/Tk C API and needs to get the address of the Tcl interpreter object. A simple cast of the return value to (Tcl_Interp *) will do the trick now.
* Made lint a bit happier.Fred Drake1998-04-291-54/+80
| | | | Fixed a memory leak in an error handler.