summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 954b2b3..3f55b0a 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -3005,6 +3005,9 @@ CallCommandTraces(
* This function returns a Tcl_Obj with the full source string for the
* command. This insures that traces get a correct NUL-terminated command
* string.
+ * If parameter 'command' is (char*)-1 it returns a pointer to the command's
+ * source using TclGetSrcInfoForCmd. As parameter 'numChars' could be used
+ * an ENSEMBLE_PSEUDO_COMMAND to advise call of the ensemble command.
*
*----------------------------------------------------------------------
*/
@@ -3022,6 +3025,9 @@ GetCommandSource(
}
if (command == (char *) -1) {
command = TclGetSrcInfoForCmd(iPtr, &numChars);
+ if (!command) {
+ return Tcl_NewListObj(objc, objv);
+ }
}
return Tcl_NewStringObj(command, numChars);
}
@@ -3533,8 +3539,10 @@ TclEvalObjvInternal(
* for traces. NULL if the string
* representation of the command is unknown is
* to be generated from (objc,objv), -1 if it
- * is to be generated from bytecode
- * source. This is only needed the traces. */
+ * is to be generated from bytecode source,
+ * with length ENSEMBLE_PSEUDO_COMMAND it is
+ * to be determined from the ensemble context.
+ * This is only needed the traces. */
int length, /* Number of bytes in command; if -1, all
* characters up to the first null byte are
* used. */