summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclClock.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b1bc752..a5fea35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-11 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclClock.c (TclClockInit): Do not create [clock] support
+ commands in safe interps.
+
2009-11-11 Jan Nijtmans <nijtmans@users.sf.net>
* library/http/http.tcl (http::geturl): [Bug 2891171]: URl
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.
*/