• Home
  • Raw
  • Download

Lines Matching full:tcl

10 /* TCL/TK VERSION INFO:
12 Only Tcl/Tk 8.3.1 and later are supported. Older versions are not
14 Tcl/Tk libraries.
17 /* XXX Further speed-up ideas, involving Tcl 8.0 features:
19 - Register a new Tcl type, "Python callable", which can be called more
54 /* Starting with Tcl 8.4, many APIs offer const-correctness. Unfortunately,
57 earlier versions. Once Tcl releases before 8.4 don't need to be supported
61 /* If Tcl is compiled for threads, we must also define TCL_THREAD. We define
62 it always; if Tcl is not threaded, the thread functions in
63 Tcl are empty. */
67 #include <Tcl/tcl.h>
70 #include <tcl.h>
76 /* For Tcl 8.2 and 8.3, CONST* is not defined (except on Cygwin). */
89 expecting that TCL_UTF_MAX is changed if Tcl ever supports
96 #error "unsupported Tcl configuration"
122 messiness. In Tcl 8.0 and later, it is not available on Windows (and on
132 /* If Tcl can wait for a Unix file descriptor, define the EventHook() routine
133 which uses this to handle Tcl events while the user is typing commands. */
148 /* The threading situation is complicated. Tcl is not thread-safe, except
150 So we need to use a lock around all uses of Tcl. Previously, the Python
152 other Python threads need to run while Tcl is blocked waiting for events.
154 To solve this problem, a separate lock for Tcl is introduced. Holding it
159 Py_END_ALLOW_THREADS. They should be used whenever a call into Tcl is made
160 that could call an event handler, or otherwise affect the state of a Tcl
163 released and the lock for Tcl has been acquired.
165 Sometimes, it is necessary to have both the Python lock and the Tcl lock.
166 (For example, when transferring data from the Tcl interpreter result to a
169 the thread state) but doesn't release the Tcl lock; LEAVE_OVERLAP_TCL
170 releases the Tcl lock.
172 By contrast, ENTER_PYTHON and LEAVE_PYTHON are used in Tcl event
174 entered while the lock for Tcl is held; the event handler presumably needs
175 to use Python. ENTER_PYTHON releases the lock for Tcl and acquires
178 for Tcl. It is okay for ENTER_TCL/LEAVE_TCL pairs to be contained inside
184 If Tcl is threaded, this approach won't work anymore. The Tcl interpreter is
193 In addition, for a threaded Tcl, a single global tcl_tstate won't be sufficient
194 anymore, since multiple Tcl interpreters may simultaneously dispatch in different
195 threads. So we use the Tcl TLS API.
233 PyErr_SetString(PyExc_RuntimeError, "Calling Tcl from different appartment"); \
474 /* Tcl encodes null character as \xc0\x80 */ in unicode_FromTclStringAndSize()
508 /* If Tcl string contains any bytes with the top bit set, in fromTclStringAndSize()
573 /* In some cases, Tcl will still return strings that are supposed to be
732 PyErr_SetString(PyExc_RuntimeError, "Tcl is threaded but _tkinter is not"); in Tkapp_New()
739 /* If Tcl is threaded, we don't need the lock. */ in Tkapp_New()
864 /** Tcl Eval **/
969 PyDoc_STRVAR(get_typename__doc__, "name of the Tcl type");
1165 /* This #ifdef assumes that Tcl uses UCS-2. in AsObj()
1189 /* Tcl doesn't do UTF-16, yet. */ in AsObj()
1192 "(U+0000-U+FFFF) allowed by Tcl", in AsObj()
1377 /* fall through: return tcl object. */ in FromObj()
1412 /* booleanString type is not registered in Tcl */ in FromObj()
1421 /* bignum type is not registered in Tcl */ in FromObj()
1455 /* Convert Python objects to Tcl objects. This must happen in the
1537 the Tcl interpreter thread. Initially, it holds the Tcl lock, and doesn't
1582 /* This is the main entry point for calling a Tcl command.
1584 1. Tcl is not threaded: Must have the Tcl lock, then can invoke command in
1586 2. Tcl is threaded, caller of the command is in the interpreter thread:
1587 Execute the command in the calling thread. Since the Tcl lock will
1589 3. Tcl is threaded, caller is in a different thread: Must queue an event to
1590 the interpreter thread. Allocation of Tcl objects needs to occur in the
1674 much, so I can't be bothered. Unfortunately Tcl doesn't export a in Tkapp_GlobalCall()
1817 /** Tcl Variable **/
1938 /* Tcl is not threaded, or this is the interpreter thread. */ in var_invoke()
1955 /* XXX Acquire tcl lock??? */ in SetVar()
1977 /* XXX must hold tcl lock already??? */ in SetVar()
2095 /** Tcl to Python **/
2427 /** Tcl Command **/
2444 /* This is the Tcl command that acts as a wrapper for Python
2600 PyErr_SetString(Tkinter_TclError, "can't create Tcl command"); in Tkapp_CreateCommand()
2649 PyErr_SetString(Tkinter_TclError, "can't delete Tcl command"); in Tkapp_DeleteCommand()
2747 /* We don't have the Tcl lock since Tcl is threaded. */ in Tkapp_CreateFileHandler()
2750 "for threaded Tcl"); in Tkapp_CreateFileHandler()
2796 /* We don't have the Tcl lock since Tcl is threaded. */ in Tkapp_DeleteFileHandler()
2799 "for threaded Tcl"); in Tkapp_DeleteFileHandler()
2980 /* We don't have the Tcl lock since Tcl is threaded. */ in Tkapp_CreateTimerHandler()
2983 "for threaded Tcl"); in Tkapp_CreateTimerHandler()
3024 /* We don't have the Tcl lock since Tcl is threaded. */ in Tkapp_MainLoop()
3027 "for threaded Tcl"); in Tkapp_MainLoop()
3210 /* Convert Python string or any buffer compatible object to Tcl byte-array
3211 * object. Use it to pass binary data (e.g. image's data) to Tcl/Tk commands.
3686 /* Tk_MacOSXSetupTkNotifier must be called before Tcl's subsystems in init_tkinter()
3692 * Tcl interpreter for now. It probably should work to do this in init_tkinter()
3700 /* This helps the dynamic loader; in Unicode aware Tcl versions in init_tkinter()
3701 it also helps Tcl find its encodings. */ in init_tkinter()