summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-09 14:06:53 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-09 14:06:53 (GMT)
commit1111254200cc2b8bc8aa2d899f43d56884f1f1cb (patch)
tree321682fffd0f114d52e16ad5231ed933e40ad10e /generic/tclBasic.c
parent47412dd55bfb480602e28ca7d73b0aef74b622cb (diff)
downloadtcl-1111254200cc2b8bc8aa2d899f43d56884f1f1cb.zip
tcl-1111254200cc2b8bc8aa2d899f43d56884f1f1cb.tar.gz
tcl-1111254200cc2b8bc8aa2d899f43d56884f1f1cb.tar.bz2
Turn namespace into an ensemble. Not yet on trunk because of some mysterious failures that need resolving...
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,