summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-10-07 17:57:42 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-10-07 17:57:42 (GMT)
commitdbbfe378f614f96d7ab98c27bf89d733ba04d1b6 (patch)
tree683ba9bb560fe94aebd40fb15bb998a3033a2536 /generic/tclBasic.c
parent35bac8b2387c036a6ac3ac6c699ddde95f050062 (diff)
downloadtcl-dbbfe378f614f96d7ab98c27bf89d733ba04d1b6.zip
tcl-dbbfe378f614f96d7ab98c27bf89d733ba04d1b6.tar.gz
tcl-dbbfe378f614f96d7ab98c27bf89d733ba04d1b6.tar.bz2
* generic/tclBasic.c: Move [tailcall], [coroutine] and
* generic/tclCmdIL.c: [yield] out of ::tcl::unsupported * tests/info.test: and into global scope: TIPs #327 * tests/unsupported.test: and #328
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 036707d..afddfb6 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.370 2008/10/03 00:01:35 dkf Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.371 2008/10/07 17:57:42 msofer Exp $
*/
#include "tclInt.h"
@@ -139,9 +139,6 @@ static Tcl_NRPostProc NRRunObjProc;
static Tcl_NRPostProc AtProcExitCleanup;
static Tcl_NRPostProc NRAtProcExitEval;
-static int InfoCoroutineCmd(ClientData dummy, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-
/*
* The following structure define the commands in the Tcl core.
*/
@@ -216,7 +213,10 @@ static const CmdInfo builtInCmds[] = {
{"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1},
{"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1},
{"while", Tcl_WhileObjCmd, TclCompileWhileCmd, TclNRWhileObjCmd, 1},
-
+
+ {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1},
+ {"yield", NULL, NULL, TclNRYieldObjCmd, 1},
+
/*
* Commands in the OS-interface. Note that many of these are unsafe.
*/
@@ -712,7 +712,8 @@ Tcl_CreateInterp(void)
for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) {
if ((cmdInfoPtr->objProc == NULL)
- && (cmdInfoPtr->compileProc == NULL)) {
+ && (cmdInfoPtr->compileProc == NULL)
+ && (cmdInfoPtr->nreProc == NULL)) {
Tcl_Panic("builtin command with NULL object command proc and a NULL compile proc");
}
@@ -780,23 +781,16 @@ Tcl_CreateInterp(void)
Tcl_DisassembleObjCmd, NULL, NULL);
/*
- * Create unsupported commands for tailcall, coroutine and yield
- * Create unsupported commands for atProcExit and tailcall
+ * Create the 'tailcall' command an unsupported command for 'atProcExit'
*/
- Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit",
- /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE),
- NULL);
- Tcl_NRCreateCommand(interp, "::tcl::unsupported::tailcall",
+ Tcl_NRCreateCommand(interp, "tailcall",
/*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_TAILCALL_TYPE),
NULL);
- Tcl_NRCreateCommand(interp, "::tcl::unsupported::coroutine",
- /*objProc*/ NULL, TclNRCoroutineObjCmd, NULL, NULL);
- Tcl_NRCreateCommand(interp, "::tcl::unsupported::yield",
- /*objProc*/ NULL, TclNRYieldObjCmd, NULL, NULL);
- Tcl_NRCreateCommand(interp, "::tcl::unsupported::infoCoroutine",
- /*objProc*/ NULL, InfoCoroutineCmd, NULL, NULL);
+ Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit",
+ /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE),
+ NULL);
#ifdef USE_DTRACE
/*
@@ -5626,7 +5620,6 @@ Tcl_EvalObj(
{
return Tcl_EvalObjEx(interp, objPtr, 0);
}
-
#undef Tcl_GlobalEvalObj
int
Tcl_GlobalEvalObj(
@@ -8490,11 +8483,11 @@ TclNRCoroutineObjCmd(
}
/*
- * This belongs in the [info] ensemble later on
+ * This is used in the [info] ensemble
*/
-static int
-InfoCoroutineCmd(
+int
+TclInfoCoroutineCmd(
ClientData dummy,
Tcl_Interp *interp,
int objc,