Commit Graph

203 Commits

Author SHA1 Message Date
Martin v. Löwis a965649386 Wrap thread stuff in WITH_THREAD. Fixes #704641. 2003-03-30 08:44:58 +00:00
Martin v. Löwis 52ae6f67d9 Fake bool API for Python 2.2. 2003-03-30 08:26:04 +00:00
Neal Norwitz 12e2217501 Fix SF #692416, don't crash interpreter for _tkinter.deletefilehandler
in addition to createfilehandler and creaetetimerhandler.
2003-03-03 21:16:39 +00:00
Martin v. Löwis 7f13489bdf Don't crash on _tkinter.createfilehandler in non-threaded Tcl;
disable this function in threaded Tcl. Likewise for creaetetimerhandler.
Fixes #692416.
2003-03-03 10:40:01 +00:00
Neal Norwitz ec74f2fda7 Add more missing PyErr_NoMemory() after failled memory allocs 2003-02-11 23:05:40 +00:00
Martin v. Löwis 70c3dda2fb Convert booleans to integers in IntVar.set. Fixes #671741.
Return booleans from _tkinter.getboolean.
Convert booleans to Tcl booleans in AsObj.
2003-01-22 09:17:38 +00:00
Martin v. Löwis cd9a8b6bcf Avoid usage of PyDoc_STR in 2.2 compatibility code. 2003-01-21 21:52:57 +00:00
Jason Tishler fb8595df4f Patch #661760: Cygwin auto-import module patch
The attached patch enables shared extension
modules to build cleanly under Cygwin without
moving the static initialization of certain function
pointers (i.e., ones exported from the Python
DLL core) to a module initialization function.

Additionally, this patch fixes the modules that
have been changed in the past to accommodate
Cygwin.
2003-01-06 12:41:26 +00:00
Martin v. Löwis 3a57d9de07 Fix typo. 2003-01-04 08:54:59 +00:00
Martin v. Löwis 6a759d9e00 Remove appartment check from dooneevent. Fixes #660961.
Check whether self is NULL in mainloop.
2003-01-04 08:36:57 +00:00
Martin v. Löwis 3919571f82 Wrap doc strings in PyDoc_STRVAR. Fix .string docstring. Provide default
macro definitions for older Python releases.
2003-01-04 00:33:13 +00:00
Martin v. Löwis 25c7b50e8f Convert Tcl path objects to strings. Fixes #661357.
Provide .string attribute and __unicode for Tcl_Objs.
2003-01-04 00:08:09 +00:00
Jason Tishler bbe8961698 Patch #660485: Cygwin _tkinter Tcl/Tk 8.3 patch
The attached patch enables Cygwin Python to
build cleanly against the latest Cygwin Tcl/Tk
which is based on Tcl/Tk 8.3. It also prevents
building against the real X headers, if installed.
2002-12-31 20:30:46 +00:00
Martin v. Löwis ba2f875d90 Eliminate C++ comment. 2002-12-31 17:34:30 +00:00
Martin v. Löwis 5b177f18ee Silence cast warnings for Tcl 8.3. 2002-12-30 18:14:15 +00:00
Martin v. Löwis 5b26abb37a Gracefully delay runtime error up to 1s. Add .willdispatch(). 2002-12-28 09:23:09 +00:00
Martin v. Löwis 7d1349553b Always initialize objc. 2002-12-12 19:05:48 +00:00
Martin v. Löwis b5bfb9f38c Support threads-enabled Tcl installations. 2002-12-12 17:07:58 +00:00
Martin v. Löwis 33ec3ba217 Remove C++ comment. Silence unsigned char* cast warning. 2002-12-07 14:57:11 +00:00
Martin v. Löwis e07e18d41b Decode untyped strings from UTF-8. 2002-12-04 19:54:36 +00:00
Martin v. Löwis 4ec2e7071e Avoid including tclInt.h. 2002-11-26 22:12:12 +00:00
Martin v. Löwis 8c8aa5d666 Rename want_objects to wantobjects throughout, for consistency. 2002-11-26 21:39:48 +00:00
Martin v. Löwis ffad633af9 Patch #518625: Return objects in Tkinter. 2002-11-26 09:28:05 +00:00
Martin v. Löwis 3c6d6f2ff7 Support UCS-4 builds. 2002-10-01 18:50:56 +00:00
Martin v. Löwis 71e25a0e06 Eliminate constness warnings with Tcl 8.4. 2002-10-01 18:08:06 +00:00
Martin v. Löwis 6bfa2e6892 Drop support for Tk 8.0 and 8.1. 2002-10-01 17:48:31 +00:00
Mark Hammond 62b1ab1b31 Replace DL_IMPORT with PyMODINIT_FUNC and remove "/export:init..." link
command line for Windows builds.  This should allow MSVC to import and
build the Python MSVC6 project files without error.
2002-07-23 06:31:15 +00:00
Jeremy Hylton 938ace69a0 staticforward bites the dust.
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure.  Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers.  (In
fact, we expect that the compilers are all fixed eight years later.)

I'm leaving staticforward and statichere defined in object.h as
static.  This is only for backwards compatibility with C extensions
that might still use it.

XXX I haven't updated the documentation.
2002-07-17 16:30:39 +00:00
Neal Norwitz b5b5a260ea Fix SF bug #557436, TclError is a str should be an Exception
Make Tkinter.TclError derive from Exception, it was a string.
2002-06-04 17:14:07 +00:00
Neal Norwitz b049325e92 Use symbolic METH_VARARGS/METH_OLDARGS instead of 1/0 for ml_flags 2002-03-31 14:44:22 +00:00
Martin v. Löwis 84432eb4c0 Encode Unicode arguments to split/splitlist as UTF-8. Fixes #507962.
2.2.1 bugfix candidate.
2002-01-26 20:21:50 +00:00
Martin v. Löwis 43b936d08c Patch #477750: Use METH_ constants in Modules. 2002-01-17 23:15:58 +00:00
Jack Jansen cb85244228 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
work with Mac OS X Aqua-Tk, all nicely within ifdefs.

The process is not for the faint of heart, though: you need to download
and install the (alfa) Aqua-Tk, obtain a few needed X11 headers from
somewhere else and then everything builds. To run scripts using Tkinter
you must build with --enable-framework, build Python.app in Mac/OSX
and run your Tkinter scripts with that. Then, about half the tests in
Demo/tkinter work (or at least do something).

Checking this in anyway because it shouldn't break anything, and newer
versions of Aqua-Tk will streamline the process.
2001-12-09 23:15:56 +00:00
Tim Peters 885d457709 sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.
2001-11-28 20:27:42 +00:00
Martin v. Löwis 339d0f720e Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
2001-08-17 18:39:25 +00:00
Jack Jansen f249addeed Got rid of (hopefully) the last 68k-mac related ifdefs. 2001-08-07 15:32:37 +00:00
Jack Jansen 84c10b13bb File handlers don't work on the mac, so don't pretend they do. I guess this is a 2.1.1 candidate, if it isn't too late for that. 2001-07-16 19:32:52 +00:00
Tim Peters 4324aa3572 Cruft cleanup: Removed the unused last_is_sticky argument from the internal
_PyTuple_Resize().
2001-05-28 22:30:08 +00:00
Martin v. Löwis 02956017f9 Do not release unallocated Tcl objects. Closes #117278 and #117167. 2000-10-29 00:44:43 +00:00
Guido van Rossum ada6d87c0c Fix for Bug #116453.
Direct use of interp->result is deprecated; changing this to
Tcl_GetStringResult(interp) everywhere fixed the problem of losing the
error message with TclError exceptions, on Windows.
2000-10-12 17:14:46 +00:00
Guido van Rossum 2834b974b6 [ Bug #113803 ] [2.0b1 NT4.0] printing non asci char causes idle to abort
http://sourceforge.net/bugs/?func=detailbug&bug_id=113803&group_id=5470

Add Unicode support and error handling to AsString().  Both AsString()
and Merge() now return NULL and set a proper Python exception
condition when an error happens; Merge() and other callers of
AsString() check for errors from AsString().  Also fixed cleanup in
Merge() and Tkapp_Call() return cleanup code; the fv array was not
necessarily completely initialized, causing calls to ckfree() with
garbage arguments!

(Also reindented some lines that were longer than 80 chars and
reformatted some code that used an alien coding standard.)
2000-10-06 16:58:26 +00:00
Tim Peters 98dc065c1b SF "bug" 115973: patches from Norman Vine so that shared libraries and
Tkinter work under Cygwin.  Accepted on faith & reasonableness.
2000-10-05 19:24:26 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Peter Schneider-Kamp 7e01890986 merge Include/my*.h into Include/pyport.h
marked my*.h as obsolete
2000-07-31 15:28:04 +00:00
Thomas Wouters 58d0510245 ANSIfy some more forward declarations. 2000-07-24 14:43:35 +00:00
Thomas Wouters f3f33dcf03 Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.

All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:

long
func(a, b)
	long a;
	long b; /* flagword */
{

and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
2000-07-21 06:00:07 +00:00
Andrew M. Kuchling 9f28a039f6 Use PyObject_AsFileDescriptor 2000-07-13 23:59:35 +00:00
Jeremy Hylton 03657cfdb0 replace PyXXX_Length calls with PyXXX_Size calls 2000-07-12 13:05:33 +00:00
Peter Schneider-Kamp 286da3b46a ANSI-fying
added excplicit node * parameter to termvalid argument in
validate_two_chain_ops of parsermodule.c (as proposed by fred)
2000-07-10 12:43:58 +00:00
Fred Drake 509d79adaf Removed Py_PROTO, ANSI-fied sources. 2000-07-08 04:04:38 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Fred Drake a44d353e2b Trent Mick <trentm@activestate.com>:
The common technique for printing out a pointer has been to cast to a long
and use the "%lx" printf modifier. This is incorrect on Win64 where casting
to a long truncates the pointer. The "%p" formatter should be used instead.

The problem as stated by Tim:
> Unfortunately, the C committee refused to define what %p conversion "looks
> like" -- they explicitly allowed it to be implementation-defined. Older
> versions of Microsoft C even stuck a colon in the middle of the address (in
> the days of segment+offset addressing)!

The result is that the hex value of a pointer will maybe/maybe not have a 0x
prepended to it.


Notes on the patch:

There are two main classes of changes:
- in the various repr() functions that print out pointers
- debugging printf's in the various thread_*.h files (these are why the
patch is large)


Closes SourceForge patch #100505.
2000-06-30 15:01:00 +00:00
Andrew M. Kuchling 288e97b7fe Patch from Michael Hudson to fix flatten recursive data structures:
[mwh21@atrus build]$ ./python
>>> import Tkinter
>>> l = []
>>> l.append(l)
>>> Tkinter._flatten(l)
Segmentation fault (core dumped)
2000-06-19 00:55:09 +00:00
Andrew M. Kuchling e475e70128 Patch from /F:
this patch adds a fast _flatten function to the _tkinter
module, and imports it from Tkinter.py (if available).

this speeds up canvas operations like create_line and
create_polygon.  for example, a create_line with 5000
vertices runs about 50 times faster with this patch in
place.
2000-06-18 18:45:50 +00:00
Guido van Rossum 69529ad0cc When the UTF-8 conversion to Unicode fails, return an 8-bit string
instead.  This seems more robust than returning an Unicode string with
some unconverted charcters in it.

This still doesn't support getting truly binary data out of Tcl, since
we look for the trailing null byte; but the old (pre-Unicode) code did
this too, so apparently there's no need.  (Plus, I really don't feel
like finding out how Tcl deals with this in each version.)
2000-05-04 15:55:17 +00:00
Guido van Rossum 990f5c6c98 Two changes to improve (I hope) Unicode support.
1. In Tcl 8.2 and later, use Tcl_NewUnicodeObj() when passing a Python
Unicode object rather than going through UTF-8.  (This function
doesn't exist in Tcl 8.1, so there the original UTF-8 code is still
used; in Tcl 8.0 there is no support for Unicode.)  This assumes that
Tcl_UniChar is the same thing as Py_UNICODE; a run-time error is
issued if this is not the case.

2. In Tcl 8.1 and later (i.e., whenever Tcl supports Unicode), when a
string returned from Tcl contains bytes with the top bit set, we
assume it is encoded in UTF-8, and decode it into a Unicode string
object.

Notes:

- Passing Unicode strings to Tcl 8.0 does not do the right thing; this
isn't worth fixing.

- When passing an 8-bit string to Tcl 8.1 or later that has bytes with
the top bit set, Tcl tries to interpret it as UTF-8; it seems to fall
back on Latin-1 for non-UTF-8 bytes.  I'm not sure what to do about
this besides telling the user to disambiguate such strings by
converting them to Unicode (forcing the user to be explicit about the
encoding).

- Obviously it won't be possible to get binary data out of Tk this
way.  Do we need that ability?  How to do it?
2000-05-04 15:07:16 +00:00
Guido van Rossum b18618dab7 Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.

(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode.  I'm also holding back on his
change to main.c, which seems unnecessary to me.)
2000-05-03 23:44:39 +00:00
Guido van Rossum 8823accd1f Marc-Andre Lemburg:
Fixes a memory leak found by Fredrik Lundh.
2000-04-27 20:14:31 +00:00
Guido van Rossum 64231e5c39 Add back an obscure "feature" to the Obj version of Tkapp_Call(): a
None in an argument list *terminates* the argument list: further
arguments are *ignored*.  This isn't kosher, but too much code relies
on it, implicitly.  For example, IDLE was pretty broken.
2000-03-31 03:29:39 +00:00
Guido van Rossum a1f0a8f4a4 Don't use the object call interface in Tk 8.0 -- the EvalObj* API
changed from 8.0 to 8.1 and I see no big reason to use objects in 8.0.
At least now it works again with all versions from 8.0 - 8.3.
2000-03-31 00:51:37 +00:00
Guido van Rossum 632de27021 The Tcl_Obj patch discussed on the patches list.
This was originally submitted by Martin von Loewis as part of his
Unicode patch; all I did was add special cases for Python int and
float objects and rearrange the object type tests somewhat to speed up
the common cases (string, int, float, tuple, unicode, object).
2000-03-29 00:19:50 +00:00
Guido van Rossum a80649b357 Patch by Neil Schemenauer to remove support for Tcl/Tk versions before
8.0.  There really is no excuse, and for who really still wants those,
they can go back to Python 1.5.2.
2000-03-28 20:07:05 +00:00
Guido van Rossum e187b0eb20 Add a call to Tcl_FindExecutable(). This was inspired by a patch by
Martin von Loewis (whose more elaborate patch to use objects is still
under review).
2000-03-27 21:46:29 +00:00
Guido van Rossum 43713e5a28 Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
2000-02-29 13:59:29 +00:00
Guido van Rossum 6b26a06037 Patch by Dieter Maurer to make things work for Tcl/Tk 8.1 (tested with
8.1.1).  His approach doesn't work with Tcl/Tk 8.2, so I've placed it
inside #if TKMAJORMINOR == 8001 and #endif.  See also his patch for
tkappinit.c.
1999-11-05 18:09:56 +00:00
Guido van Rossum 11801859e0 Include myselect.h -- needed on some platforms. 1999-01-25 21:39:03 +00:00
Guido van Rossum 65d5b5763c Thanks to Chris Herborth, the thread primitives now have proper Py*
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).
1998-12-21 19:32:43 +00:00
Guido van Rossum 3886bb6997 Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
1998-12-04 18:50:17 +00:00
Guido van Rossum e9bc62d993 RajGopal Srinivasan noted that the latest code doesn't work when
running in a non-threaded environment.  He added some #ifdefs that fix
this.
1998-11-17 03:45:24 +00:00
Guido van Rossum 41f0a98f8f Looks like I didn't test this interactively. The EventHook() code was
broken; it asked for the current thread state when there was none.
Fixed by using the saved event_tstate.
1998-10-12 16:26:22 +00:00
Guido van Rossum dc1adabcb8 Patch by Jonathan Giddy (with some cleanup by me) to always use the
thread state of the thread calling mainloop() (or another event
handling function) rather than the thread state of the function that
created the client data structure.
1998-10-09 20:51:18 +00:00
Guido van Rossum 215193bd93 There's no need to declare Tk_GetNumMainWindows() (and it breaks
something in the latest win342 build).
1998-10-08 02:27:41 +00:00
Guido van Rossum 49b560698b Renamed thread.h to pythread.h. 1998-10-01 20:42:43 +00:00
Guido van Rossum 469067800b Get rid of the test for non-NULL thread state in EventHook; it can be
triggered in situations that are not an error.
1998-09-21 14:47:16 +00:00
Guido van Rossum 541f241132 Need mytime.h for Sleep(). 1998-08-13 13:29:22 +00:00
Guido van Rossum 227cf764b2 Undo a silly effect of a global substitution: the macintosh panic()
function had a reference to vPySys_WriteStderr(...) -- turn it back
into fprintf(stder, ...).
1998-08-05 13:53:32 +00:00
Guido van Rossum 43ff8683fe Temporarily get rid of the registration of Tcl_Finalize() as a
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.)
1998-07-14 18:02:13 +00:00
Guido van Rossum c821d1ecc0 Add a cast that a picky SGI compiler found was necessary. 1998-07-07 22:25:47 +00:00
Guido van Rossum f766e23f63 There was an error check in a loop in PythonCmd which called
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.)
1998-06-19 04:28:10 +00:00
Guido van Rossum 5e97783c8f # Note: a previous checkin message was lost because I can now use CVS
# 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).
1998-06-15 14:03:52 +00:00
Guido van Rossum 62320c9b9b # (My first checkin from Windows NT using remote CVS!)
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.
1998-06-15 04:36:09 +00:00
Guido van Rossum ad4db17552 Fixed the EventHook() code so that it also works on Windows, sort of.
(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...)
1998-06-13 13:56:28 +00:00
Guido van Rossum 2a5119b680 On Windows, need #include <windows.h>; and it's MS_WINDOWS, not MS_WIN32. 1998-05-29 01:28:40 +00:00
Guido van Rossum 00d93066b0 Changes to make it possible to write multi-threaded programs using
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().
1998-05-28 23:06:38 +00:00
Guido van Rossum 7bf15648a4 Use a different implementation of EventHook(). The new version
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 :-(
1998-05-22 18:28:17 +00:00
Guido van Rossum b41addf6a6 Replace all calls to fprintf(stderr, ...) with calls to PySys_WriteStderr(...). 1998-05-12 15:02:41 +00:00
Guido van Rossum 597ac20708 Trivial little change: timer tokens shouldn't have a Print() function,
they should have a Repr() function.
1998-05-12 14:36:19 +00:00
Guido van Rossum 212643f199 Still somewhat experimental speedup. This appears to speed up the
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.
1998-04-29 16:22:14 +00:00
Guido van Rossum 9d1b7ae65b Add a new method of interpreter objects, interpaddr(). This returns
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.
1998-04-29 16:17:01 +00:00
Guido van Rossum 2ea1c94b9a On the Mac a call to TkMacInitMenus is needed. Also, we pass
appropriate events to Sioux so the console window remains functional.
(Jack)
1998-04-28 16:12:43 +00:00
Guido van Rossum 2621637835 Add #ifdefs so Tcl_Finalize isn't referenced when it's not defined. 1998-04-20 18:47:52 +00:00
Guido van Rossum 730806d3d9 Make new gcc -Wall happy 1998-04-10 22:27:42 +00:00
Guido van Rossum 1c0d31565d Delete the 'exit' command from the Tcl interpreter -- it would allow
users to exit Python without the normal precautions.  (The can do this
using os._exit() anyway, but at least that's documented.)
1998-02-19 21:28:49 +00:00
Guido van Rossum 07e9fbf6b9 Register Tcl_Finalize as a Python exit handler. 1998-02-06 22:35:46 +00:00
Guido van Rossum a59406abdf Darn. When thread support is disabled, the BEGIN/END macros don't
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.
1997-10-10 17:39:19 +00:00
Guido van Rossum b0105444e2 Mac does support createfilehandler now (Jack) 1997-10-08 15:25:37 +00:00
Guido van Rossum 0e8457c4ec Fix EventHook (the trick to make widgets appear when using GNU
readline) to create and use a new thread state object -- otherwise it
would dump core!
1997-10-07 18:51:41 +00:00
Guido van Rossum 54e2091ba2 Add an optional hack for threads in Tkinter.
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.
1997-09-28 05:52:41 +00:00
Guido van Rossum 83551bfeda Export names for the types defined by this module: TkappType and TkttType. 1997-09-13 00:44:23 +00:00
Guido van Rossum 75626a3b93 Indent the #error so that a strict K&R cpp doesn't complain. 1997-09-08 02:04:00 +00:00