[Python-Dev] _tkinter problem with Stackless

Christian Tismer tismer@tismer.com
Sun, 26 May 2002 02:49:40 -0700


Martin v. Loewis wrote:
> 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.

Yes, I saw this and tried some quick hacks to see if
I can get around it, but the following is much worse
and really hurts:

> 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.

Incredibly bad! Bad style, even worse, bad for me.
I change my question to:
What patterns beyond the
Python -> Tcl -> Python -> Tcl
scenario are thinkable?
I already spent 14 hours on this. I'm happy
to work around it if there is a finite
number of cases. But if this leads to major
changes to Tcl, I'd prefer to declare Stackless
incompatible with Tcl. It works great with PythonWin
and wxPython, which is a plus for design.

ciao - chris

p.s.: This would be a great chance to submit a PowerPC
patch, since I'm very near to a production release.
-- 
Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/