summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2017-03-14 22:22:40 (GMT)
committerKevin B Kenny <kennykb@acm.org>2017-03-14 22:22:40 (GMT)
commitbbf9191cdf2558bb4e7571a1cf57886d79826c7e (patch)
tree7060222536c985bc82a9689d4b8dae9a3e23df03 /generic/tclBasic.c
parent084c8b2259399cfa7c22283d77abb1820207afad (diff)
parentcd42f659661ae1b0035564950db6299334f612da (diff)
downloadtcl-bbf9191cdf2558bb4e7571a1cf57886d79826c7e.zip
tcl-bbf9191cdf2558bb4e7571a1cf57886d79826c7e.tar.gz
tcl-bbf9191cdf2558bb4e7571a1cf57886d79826c7e.tar.bz2
Make 'clock' and 'encoding' into compilable ensembles that play with safe interps
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 6ff5faa..32caac5 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -265,7 +265,6 @@ static const CmdInfo builtInCmds[] = {
{"cd", Tcl_CdObjCmd, NULL, NULL, 0},
{"close", Tcl_CloseObjCmd, NULL, NULL, CMD_IS_SAFE},
{"eof", Tcl_EofObjCmd, NULL, NULL, CMD_IS_SAFE},
- {"encoding", Tcl_EncodingObjCmd, NULL, NULL, 0},
{"exec", Tcl_ExecObjCmd, NULL, NULL, 0},
{"exit", Tcl_ExitObjCmd, NULL, NULL, 0},
{"fblocked", Tcl_FblockedObjCmd, NULL, NULL, CMD_IS_SAFE},
@@ -790,16 +789,17 @@ Tcl_CreateInterp(void)
}
/*
- * Create the "array", "binary", "chan", "dict", "file", "info",
- * "namespace" and "string" ensembles. Note that all these commands (and
- * their subcommands that are not present in the global namespace) are
- * wholly safe *except* for "file".
+ * Create the "array", "binary", "chan", "clock", "dict", "encoding",
+ * "file", "info", "namespace" and "string" ensembles. Note that all these
+ * commands (and their subcommands that are not present in the global
+ * namespace) are wholly safe *except* for "clock", "encoding" and "file".
*/
TclInitArrayCmd(interp);
TclInitBinaryCmd(interp);
TclInitChanCmd(interp);
TclInitDictCmd(interp);
+ TclInitEncodingCmd(interp);
TclInitFileCmd(interp);
TclInitInfoCmd(interp);
TclInitNamespaceCmd(interp);
@@ -1027,6 +1027,7 @@ TclHideUnsafeCommands(
Tcl_HideCommand(interp, cmdInfoPtr->name, cmdInfoPtr->name);
}
}
+ TclMakeEncodingCommandSafe(interp); /* Ugh! */
TclMakeFileCommandSafe(interp); /* Ugh! */
return TCL_OK;
}