summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-10-08 15:10:30 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-10-08 15:10:30 (GMT)
commit3dac24314a5483f488d9d5255b7fb6bbeba91b3b (patch)
tree24e837db74d4613110a015e7dc96020d98a846ac /generic/tclBasic.c
parent7d5aead5703d324d80a98cf890f90b9a452cb9a2 (diff)
downloadtcl-3dac24314a5483f488d9d5255b7fb6bbeba91b3b.zip
tcl-3dac24314a5483f488d9d5255b7fb6bbeba91b3b.tar.gz
tcl-3dac24314a5483f488d9d5255b7fb6bbeba91b3b.tar.bz2
* generic/tclBasic (TclInfoCoroutineCmd):
* tests/unsupported.test: arrange for [info coroutine] to return {} when a coroutine is running but the resume command has been deleted [Bug 2153080]
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index afddfb6..b2c9e7c 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.371 2008/10/07 17:57:42 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.372 2008/10/08 15:10:30 msofer Exp $
*/
#include "tclInt.h"
@@ -8498,10 +8498,13 @@ TclInfoCoroutineCmd(
if (corPtr) {
Tcl_Command cmd = (Tcl_Command) corPtr->cmdPtr;
Tcl_Obj *namePtr;
-
- TclNewObj(namePtr);
- Tcl_GetCommandFullName(interp, cmd, namePtr);
- Tcl_SetObjResult(interp, namePtr);
+ int deleted = (((Command *)cmd)->flags & CMD_IS_DELETED);
+
+ if (!deleted) {
+ TclNewObj(namePtr);
+ Tcl_GetCommandFullName(interp, cmd, namePtr);
+ Tcl_SetObjResult(interp, namePtr);
+ }
}
return TCL_OK;
}