summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-10 21:33:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-10 21:33:27 (GMT)
commitccbdab58c3c61f608193891e01c65277bcd03a74 (patch)
tree20879f4cd95e27db3b1128779e7d8df706bdd0c0 /generic/tclBasic.c
parenta4400dbc29df9167ce93222e822d8f2868215f8a (diff)
parent1d5c8f395413d93b65f5d82deda05776957456b2 (diff)
downloadtcl-ccbdab58c3c61f608193891e01c65277bcd03a74.zip
tcl-ccbdab58c3c61f608193891e01c65277bcd03a74.tar.gz
tcl-ccbdab58c3c61f608193891e01c65277bcd03a74.tar.bz2
Turn namespace into an ensemble.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 20cb1ad..9d5b006 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -237,7 +237,6 @@ static const CmdInfo builtInCmds[] = {
{"lsearch", Tcl_LsearchObjCmd, NULL, NULL, 1},
{"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, NULL, 1},
{"lsort", Tcl_LsortObjCmd, NULL, NULL, 1},
- {"namespace", Tcl_NamespaceObjCmd, TclCompileNamespaceCmd, TclNRNamespaceObjCmd, 1},
{"package", Tcl_PackageObjCmd, NULL, NULL, 1},
{"proc", Tcl_ProcObjCmd, NULL, NULL, 1},
{"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, NULL, 1},
@@ -780,10 +779,10 @@ Tcl_CreateInterp(void)
}
/*
- * Create the "array", "binary", "chan", "dict", "file", "info" 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", "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".
*/
TclInitArrayCmd(interp);
@@ -792,6 +791,7 @@ Tcl_CreateInterp(void)
TclInitDictCmd(interp);
TclInitFileCmd(interp);
TclInitInfoCmd(interp);
+ TclInitNamespaceCmd(interp);
TclInitStringCmd(interp);
TclInitPrefixCmd(interp);
@@ -825,10 +825,9 @@ Tcl_CreateInterp(void)
Tcl_RepresentationCmd, NULL, NULL);
/* Adding the bytecode assembler command */
- cmdPtr = (Command*)
- Tcl_NRCreateCommand(interp, "::tcl::unsupported::assemble",
- Tcl_AssembleObjCmd, TclNRAssembleObjCmd,
- NULL, NULL);
+ cmdPtr = (Command *) Tcl_NRCreateCommand(interp,
+ "::tcl::unsupported::assemble", Tcl_AssembleObjCmd,
+ TclNRAssembleObjCmd, NULL, NULL);
cmdPtr->compileProc = &TclCompileAssembleCmd;
Tcl_NRCreateCommand(interp, "::tcl::unsupported::yieldTo", NULL,