| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes a memory leak found by Fredrik Lundh.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
8.0. There really is no excuse, and for who really still wants those,
they can go back to Python 1.5.2.
|
|
|
|
|
| |
Martin von Loewis (whose more elaborate patch to use objects is still
under review).
|
|
|
|
| |
PyArg_ParseTuple() format string arguments as possible.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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).
|
|
|
|
| |
on BeOS or Windows.
|
|
|
|
|
| |
running in a non-threaded environment. He added some #ifdefs that fix
this.
|
|
|
|
|
| |
broken; it asked for the current thread state when there was none.
Fixed by using the saved event_tstate.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
something in the latest win342 build).
|
| |
|
|
|
|
| |
triggered in situations that are not an error.
|
| |
|
|
|
|
|
| |
function had a reference to vPySys_WriteStderr(...) -- turn it back
into fprintf(stder, ...).
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
|
|
| |
# 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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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...)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
| |
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 :-(
|
| |
|
|
|
|
| |
they should have a Repr() function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
appropriate events to Sioux so the console window remains functional.
(Jack)
|
| |
|
| |
|
|
|
|
|
| |
users to exit Python without the normal precautions. (The can do this
using os._exit() anyway, but at least that's documented.)
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
readline) to create and use a new thread state object -- otherwise it
would dump core!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
figure out how to do this right.
|
|
|
|
| |
Tk 8.0; this was a mistake.
|
|
|
|
|
| |
usable createfilehandler). Define HAVE_CREATEFILEHANDLER to test
later. Also other Mac specific patches by Jack.
|
|
|
|
| |
Also cleaned out some CR's left by the VC++ editor.
|
|
|
|
| |
under WIN32 -- remove file handler interface, don't use Py_input_hook.
|
| |
|