diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-04-17 17:10:39 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-04-17 17:10:39 (GMT) |
commit | 32c03200e2d7d642210f4bc140ba02b0ce7536f9 (patch) | |
tree | ad3578d8aeba715c189fcad658e70676ff705e2b /generic | |
parent | ab860ac2f81d704afe4416c89c000d677806be9a (diff) | |
parent | e5ced1c96d6213766cd6263eddcab12ba1a916a9 (diff) | |
download | tcl-32c03200e2d7d642210f4bc140ba02b0ce7536f9.zip tcl-32c03200e2d7d642210f4bc140ba02b0ce7536f9.tar.gz tcl-32c03200e2d7d642210f4bc140ba02b0ce7536f9.tar.bz2 |
merge trunk
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 21fb2e2..e09ea1e 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -928,6 +928,17 @@ Tcl_CreateInterp(void) TclPrecTraceProc, NULL); TclpSetVariables(interp); +#ifdef TCL_THREADS + /* + * The existence of the "threaded" element of the tcl_platform array + * indicates that this particular Tcl shell has been compiled with threads + * turned on. Using "info exists tcl_platform(threaded)" a Tcl script can + * introspect on the interpreter level of thread safety. + */ + + Tcl_SetVar2(interp, "tcl_platform", "threaded", "1", TCL_GLOBAL_ONLY); +#endif + /* * Register Tcl's version number. * TIP #268: Full patchlevel instead of just major.minor |