summaryrefslogtreecommitdiffstats
path: root/generic/tclEnsemble.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r--generic/tclEnsemble.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 629d7a2..01c3921 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -664,12 +664,12 @@ TclNamespaceEnsembleCmd(
Tcl_Command
TclCreateEnsembleInNs(
- Tcl_Interp *interp,
-
+ Tcl_Interp *interp,
+
const char *name, /* Simple name of command to create (no */
/* namespace components). */
- Tcl_Namespace /* Name of namespace to create the command in. */
- *nameNsPtr,
+ Tcl_Namespace /* Name of namespace to create the command in. */
+ *nameNsPtr,
Tcl_Namespace
*ensembleNsPtr, /* Name of the namespace for the ensemble. */
int flags
@@ -747,7 +747,6 @@ Tcl_CreateEnsemble(
Tcl_Namespace *namespacePtr,
int flags)
{
- Tcl_Obj *nameObj = NULL;
Namespace *nsPtr = (Namespace *)namespacePtr, *foundNsPtr, *altNsPtr,
*actualNsPtr;
const char * simpleName;
@@ -756,11 +755,8 @@ Tcl_CreateEnsemble(
nsPtr = (Namespace *) TclGetCurrentNamespace(interp);
}
- TclGetNamespaceForQualName(interp, name, nsPtr, 0,
+ TclGetNamespaceForQualName(interp, name, nsPtr, TCL_CREATE_NS_IF_UNKNOWN,
&foundNsPtr, &altNsPtr, &actualNsPtr, &simpleName);
- if (nameObj != NULL) {
- TclDecrRefCount(nameObj);
- }
return TclCreateEnsembleInNs(interp, simpleName,
(Tcl_Namespace *) foundNsPtr, (Tcl_Namespace *) nsPtr, flags);
}
@@ -2608,7 +2604,7 @@ BuildEnsembleConfig(
if (ensemblePtr->subcmdList == ensemblePtr->subcommandDict) {
subcmdDictCopy = Tcl_DuplicateObj(ensemblePtr->subcommandDict);
} else {
- subcmdDictCopy = ensemblePtr->subcommandDict;
+ subcmdDictCopy = ensemblePtr->subcommandDict;
}
Tcl_IncrRefCount(subcmdDictCopy);
}