summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index e38f2da..d1da5ae 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -21,7 +21,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.44 2004/08/03 21:46:55 dkf Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.45 2004/08/25 21:28:26 dkf Exp $
*/
#include "tclInt.h"
@@ -4933,22 +4933,12 @@ NsEnsembleImplementationCmd(clientData, interp, objc, objv)
if (ensemblePtr->unknownHandler != NULL && reparseCount++ < 1) {
int paramc, i;
- Tcl_Obj **paramv, *unknownCmd;
- char *ensName = TclGetString(objv[0]);
+ Tcl_Obj **paramv, *unknownCmd, *ensObj;
unknownCmd = Tcl_DuplicateObj(ensemblePtr->unknownHandler);
- if (ensName[0] == ':') {
- Tcl_ListObjAppendElement(NULL, unknownCmd, objv[0]);
- } else {
- Tcl_Obj *qualEnsembleObj =
- Tcl_NewStringObj(Tcl_GetCurrentNamespace(interp)->fullName,-1);
- if (Tcl_GetCurrentNamespace(interp)->parentPtr) {
- Tcl_AppendStringsToObj(qualEnsembleObj, "::", ensName, NULL);
- } else {
- Tcl_AppendStringsToObj(qualEnsembleObj, ensName, NULL);
- }
- Tcl_ListObjAppendElement(NULL, unknownCmd, qualEnsembleObj);
- }
+ TclNewObj(ensObj);
+ Tcl_GetCommandFullName(interp, ensemblePtr->token, ensObj);
+ Tcl_ListObjAppendElement(NULL, unknownCmd, ensObj);
for (i=1 ; i<objc ; i++) {
Tcl_ListObjAppendElement(NULL, unknownCmd, objv[i]);
}