summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
Commit message (Collapse)AuthorAgeFilesLines
* Need mytime.h for Sleep().Guido van Rossum1998-08-131-0/+2
|
* Undo a silly effect of a global substitution: the macintosh panic()Guido van Rossum1998-08-051-1/+1
| | | | | function had a reference to vPySys_WriteStderr(...) -- turn it back into fprintf(stder, ...).
* Temporarily get rid of the registration of Tcl_Finalize() as aGuido van Rossum1998-07-141-0/+5
| | | | | | | | | low-level Python exit handler. This can attempt to call Python code at a point that the interpreter and thread state have already been destroyed, causing a Bus Error. Given the intended use of Py_AtExit(), I'm not convinced that it's a good idea to call it earlier during Python's finalization sequence... (Although this is the only use for it in the entire distribution.)
* Add a cast that a picky SGI compiler found was necessary.Guido van Rossum1998-07-071-1/+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, 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().
* 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 :-(
* 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.
* 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.
* On the Mac a call to TkMacInitMenus is needed. Also, we passGuido van Rossum1998-04-281-2/+31
| | | | | appropriate events to Sioux so the console window remains functional. (Jack)
* Add #ifdefs so Tcl_Finalize isn't referenced when it's not defined.Guido van Rossum1998-04-201-0/+2
|
* Make new gcc -Wall happyGuido van Rossum1998-04-101-1/+1
|
* Delete the 'exit' command from the Tcl interpreter -- it would allowGuido van Rossum1998-02-191-0/+3
| | | | | users to exit Python without the normal precautions. (The can do this using os._exit() anyway, but at least that's documented.)
* Register Tcl_Finalize as a Python exit handler.Guido van Rossum1998-02-061-1/+4
|
* Darn. When thread support is disabled, the BEGIN/END macros don'tGuido van Rossum1997-10-101-4/+5
| | | | | | save and restore the tstate, but explicitly calling PyEval_SaveThread() does reset it! While I think about how to fix this for real, here's a fix that avoids getting a fatal error.
* Mac does support createfilehandler now (Jack)Guido van Rossum1997-10-081-1/+1
|
* Fix EventHook (the trick to make widgets appear when using GNUGuido van Rossum1997-10-071-3/+19
| | | | | readline) to create and use a new thread state object -- otherwise it would dump core!
* Add an optional hack for threads in Tkinter.Guido van Rossum1997-09-281-2/+2
| | | | | | | | | | | | | | | | This one works! However it requires using a modified version of tclNotify.c (provided), which requires access to the Tcl source to compile it. In order to enable this hack, add the following to the Setup line for _tkinter: tclNotify.c -DHAVE_PYTCL_WAITUNTILEVENT -I$(TCL)/generic where TCL points to the source tree of Tcl 8.0. Other versions of Tcl are not supported. The tclNotify.c file is copyrighted by Sun Microsystems; the licensing terms are in the file license.terms. According to this file, no further permission to distribute this is required, provided the file license.terms is included. Hence, I am checking that in, too.
* Export names for the types defined by this module: TkappType and TkttType.Guido van Rossum1997-09-131-0/+3
|
* Indent the #error so that a strict K&R cpp doesn't complain.Guido van Rossum1997-09-081-1/+1
|
* Remove redundant decl for PyOS_InputHook.Guido van Rossum1997-08-211-3/+0
|
* Alas, the thread support for Tk didn't work. Withdraw it, until IGuido van Rossum1997-08-191-0/+4
| | | | figure out how to do this right.
* DeleteTimerHandler was accidentally #ifdef'ed out for macintosh withGuido van Rossum1997-08-181-3/+0
| | | | Tk 8.0; this was a mistake.
* Merge Mac and Windows mods (which mostly affect the same problem -- noGuido van Rossum1997-08-141-9/+32
| | | | | usable createfilehandler). Define HAVE_CREATEFILEHANDLER to test later. Also other Mac specific patches by Jack.
* Renamed Py_input_hook to PyOS_InputHook.Guido van Rossum1997-08-111-3/+3
| | | | Also cleaned out some CR's left by the VC++ editor.
* Rather unsatisfactory temporary hack to get it to runGuido van Rossum1997-08-071-0/+10
| | | | under WIN32 -- remove file handler interface, don't use Py_input_hook.
* New mechanism for GNU readline interface, via moduleGuido van Rossum1997-08-051-9/+3
|
* Functionality enhancement: allow other threads to use Tk commandsGuido van Rossum1997-08-021-243/+211
| | | | | | | | | | | | | | | | | | while one thread is blocked in mainloop(). Also, handle signals (not just interrupts) as soon as they happen. Cleanup: remove support for Tcl/Tk versions 7.4/4.0. (I've confirmed that it works for 7.5/4.1 and 7.6/4.2, as well as 8.0b2.) Coding style change: instead of ``func (args)'', write ``func(args)'' everywhere. Minor functionality change: use PyArg_ParseTuple everywhere. This should only affect the errors reported for bad argument lists; in particular, deletefilehandler() is much clearer about what's going on. (XXX Still to do: Mac and Win ports to 8.0b2.)
* Compatibility with Tcl/Tk 8.0b*.Guido van Rossum1997-08-011-14/+28
|
* Removed remaining support for Tk versions below 4.0.Guido van Rossum1997-07-191-28/+7
|
* Mac hack to make select() work again...Guido van Rossum1997-06-021-0/+61
|
* On popular demand, re-enable the readline event hook.Guido van Rossum1997-05-071-1/+0
|
* Adapt Mac specific code to new universal headers (I think -- this isGuido van Rossum1997-04-291-3/+3
| | | | Jack's code).
* New form of PyFPE_END_PROTECT macro.Guido van Rossum1997-03-141-1/+1
|
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-141-1/+5
| | | | | Two new modules fpectl and fpetest. Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
* reformattedBarry Warsaw1997-01-161-835/+977
| | | | | | memory leak in Tkapp_(Create|Delete)FileHandler plugged. standard eyeballing
* Another fix for Split() -- don't refuse {"} but turn it into ".Guido van Rossum1996-12-171-1/+7
| | | | | | This is needed because if a configure option has " as its value, it will be rendered as {"}; after stripping one level of quoting it's just ", on which splitlist will barf.
* Check errors returned by recursive call to Split().Guido van Rossum1996-12-171-5/+12
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-1/+2
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Rationalize MS #ifdefsGuido van Rossum1996-09-111-2/+2
|
* Call __initialize(), not __sinit() on Mac dynamic loading entry.Guido van Rossum1996-08-261-1/+1
|
* Hacks to support being a Windows DLLGuido van Rossum1996-08-211-2/+5
|
* Add #define MAC_TCL for Mac.Guido van Rossum1996-08-201-0/+4
|