summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-21 23:14:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-21 23:14:16 (GMT)
commitff85c5650b6bb193f31108662dbb788c279ba3ed (patch)
tree48b506c7a8a00c7ea48e2930c7702d1a460a509b /generic/tclCmdIL.c
parent8aac121b066754f94d9a7eab0b7aa778009790af (diff)
downloadtcl-ff85c5650b6bb193f31108662dbb788c279ba3ed.zip
tcl-ff85c5650b6bb193f31108662dbb788c279ba3ed.tar.gz
tcl-ff85c5650b6bb193f31108662dbb788c279ba3ed.tar.bz2
Remove some dead code
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index c759a54..0079167 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -1839,9 +1839,6 @@ InfoProcsCmd(
const char *cmdName, *pattern;
const char *simplePattern;
Namespace *nsPtr;
-#ifdef INFO_PROCS_SEARCH_GLOBAL_NS
- Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp);
-#endif
Namespace *currNsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp);
Tcl_Obj *listPtr, *elemObjPtr;
int specificNsInPattern = 0;/* Init. to avoid compiler warning. */
@@ -1893,7 +1890,6 @@ InfoProcsCmd(
*/
listPtr = Tcl_NewListObj(0, NULL);
-#ifndef INFO_PROCS_SEARCH_GLOBAL_NS
if (simplePattern != NULL && TclMatchIsTrivial(simplePattern)) {
entryPtr = Tcl_FindHashEntry(&nsPtr->cmdTable, simplePattern);
if (entryPtr != NULL) {
@@ -1917,9 +1913,7 @@ InfoProcsCmd(
Tcl_ListObjAppendElement(interp, listPtr, elemObjPtr);
}
}
- } else
-#endif /* !INFO_PROCS_SEARCH_GLOBAL_NS */
- {
+ } else {
entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search);
while (entryPtr != NULL) {
cmdName = (const char *)Tcl_GetHashKey(&nsPtr->cmdTable, entryPtr);
@@ -1947,46 +1941,6 @@ InfoProcsCmd(
}
entryPtr = Tcl_NextHashEntry(&search);
}
-
- /*
- * If the effective namespace isn't the global :: namespace, and a
- * specific namespace wasn't requested in the pattern, then add in all
- * global :: procs that match the simple pattern. Of course, we add in
- * only those procs that aren't hidden by a proc in the effective
- * namespace.
- */
-
-#ifdef INFO_PROCS_SEARCH_GLOBAL_NS
- /*
- * If "info procs" worked like "info commands", returning the commands
- * also seen in the global namespace, then you would include this
- * code. As this could break backwards compatibility with 8.0-8.2, we
- * decided not to "fix" it in 8.3, leaving the behavior slightly
- * different.
- */
-
- if ((nsPtr != globalNsPtr) && !specificNsInPattern) {
- entryPtr = Tcl_FirstHashEntry(&globalNsPtr->cmdTable, &search);
- while (entryPtr != NULL) {
- cmdName = (const char *)Tcl_GetHashKey(&globalNsPtr->cmdTable, entryPtr);
- if ((simplePattern == NULL)
- || Tcl_StringMatch(cmdName, simplePattern)) {
- if (Tcl_FindHashEntry(&nsPtr->cmdTable,cmdName) == NULL) {
- cmdPtr = (Command *)Tcl_GetHashValue(entryPtr);
- realCmdPtr = (Command *) TclGetOriginalCommand(
- (Tcl_Command) cmdPtr);
-
- if (TclIsProc(cmdPtr) || ((realCmdPtr != NULL)
- && TclIsProc(realCmdPtr))) {
- Tcl_ListObjAppendElement(interp, listPtr,
- Tcl_NewStringObj(cmdName, -1));
- }
- }
- }
- entryPtr = Tcl_NextHashEntry(&search);
- }
- }
-#endif
}
Tcl_SetObjResult(interp, listPtr);