summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-07-09 18:49:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-07-09 18:49:38 (GMT)
commit83ae4550f1932eba49b33dcf1e661e6559d17248 (patch)
treebc24fe7bc20bb67d21747046168319a6de1724fc
parentfa9df063be85647f595d21ad8c51e20ec04061e3 (diff)
downloadtcl-83ae4550f1932eba49b33dcf1e661e6559d17248.zip
tcl-83ae4550f1932eba49b33dcf1e661e6559d17248.tar.gz
tcl-83ae4550f1932eba49b33dcf1e661e6559d17248.tar.bz2
Don't use Tcl_GetCommandInfo when Tcl_FindCommand suffices.
-rw-r--r--generic/tclZlib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 2e27303..4ccda3b 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -643,7 +643,6 @@ Tcl_ZlibStreamInit(
int e;
ZlibStreamHandle *zshPtr = NULL;
Tcl_DString cmdname;
- Tcl_CmdInfo cmdinfo;
GzipHeader *gzHeaderPtr = NULL;
switch (mode) {
@@ -769,8 +768,8 @@ Tcl_ZlibStreamInit(
Tcl_DStringInit(&cmdname);
TclDStringAppendLiteral(&cmdname, "::tcl::zlib::streamcmd_");
TclDStringAppendObj(&cmdname, Tcl_GetObjResult(interp));
- if (Tcl_GetCommandInfo(interp, Tcl_DStringValue(&cmdname),
- &cmdinfo) == 1) {
+ if (Tcl_FindCommand(interp, Tcl_DStringValue(&cmdname),
+ NULL, 0) != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"BUG: Stream command name already exists", -1));
Tcl_SetErrorCode(interp, "TCL", "BUG", "EXISTING_CMD", NULL);