[Python-Dev] _tkinter problem with Stackless
Martin v. Loewis
martin@v.loewis.de
25 May 2002 10:39:07 +0200
Christian Tismer <tismer@tismer.com> writes:
> I believe that there must be a global data structure
> for Tcl/Tk living on the C stack, between a couple of
> Python interpreter incarnations, that is used somehow.
The following functions in Tcl use non-trivial "objects" on the stack
which are passed to other functions:
- Sleep (struct timeval)
- Merge (argvStore, fvStore)
- Tkapp_Call (objStore / argvStore,fvStore)
Of those, only the Tkapp_Call one has a chance of still being in use
when the Python interpreter proper is invoked.
However, and more importantly, there is a good chance that Tcl itself
also allocates memory on the stack for use in called functions. In a
Python -> Tcl -> Python -> Tcl scenario, this may cause problems for
stackless Python; one would have to inspect the entire Tcl source
base, or analyse the specific problem in more detail to be sure.
Regards,
Martin