summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-11-12 16:31:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-11-12 16:31:38 (GMT)
commite4b809abf57f2062e0ae4be8a17c3a77b079147c (patch)
tree5368523a2a7fd8a6de7083f6848e7af59f75c034 /generic/tclClock.c
parent8be022f88dcd5cbe494a84980ba3d14df3e18f48 (diff)
downloadtcl-e4b809abf57f2062e0ae4be8a17c3a77b079147c.zip
tcl-e4b809abf57f2062e0ae4be8a17c3a77b079147c.tar.gz
tcl-e4b809abf57f2062e0ae4be8a17c3a77b079147c.tar.bz2
* generic/tclClock.c (TclClockInit): Do not create [clock] support
commands in safe interps.
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 7b445ca..5a5dec4 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclClock.c,v 1.72 2008/10/26 18:34:03 dkf Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.73 2009/11/12 16:31:38 dgp Exp $
*/
#include "tclInt.h"
@@ -256,6 +256,15 @@ TclClockInit(
int i;
/*
+ * Safe interps get [::clock] as alias to a master, so do not need their
+ * own copies of the support routines.
+ */
+
+ if (Tcl_IsSafe(interp)) {
+ return;
+ }
+
+ /*
* Create the client data, which is a refcounted literal pool.
*/