summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 7e4a0b0..d111f31 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -22,7 +22,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.147 2007/07/31 17:03:39 msofer Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.148 2007/08/03 13:51:40 dkf Exp $
*/
#include "tclInt.h"
@@ -405,7 +405,7 @@ Tcl_PushCallFrame(
framePtr->compiledLocals = NULL;
framePtr->clientData = NULL;
framePtr->localCachePtr = NULL;
-
+
/*
* Push the new call frame onto the interpreter's stack of procedure call
* frames making it the current frame.
@@ -902,7 +902,7 @@ Tcl_CreateNamespace(
void
Tcl_DeleteNamespace(
- Tcl_Namespace *namespacePtr)/* Points to the namespace to delete */
+ Tcl_Namespace *namespacePtr)/* Points to the namespace to delete. */
{
register Namespace *nsPtr = (Namespace *) namespacePtr;
Interp *iPtr = (Interp *) nsPtr->interp;
@@ -1011,8 +1011,8 @@ Tcl_DeleteNamespace(
EstablishErrorCodeTraces(NULL, nsPtr->interp, NULL, NULL, 0);
/*
- * We didn't really kill it, so remove the KILLED marks, so
- * it can get killed later, avoiding mem leaks
+ * We didn't really kill it, so remove the KILLED marks, so it can
+ * get killed later, avoiding mem leaks.
*/
nsPtr->flags &= ~(NS_DYING|NS_KILLED);
@@ -1288,7 +1288,7 @@ Tcl_Export(
for (i = 0; i < nsPtr->numExportPatterns; i++) {
if (strcmp(pattern, nsPtr->exportArrayPtr[i]) == 0) {
/*
- * The pattern already exists in the list
+ * The pattern already exists in the list.
*/
return TCL_OK;
@@ -1774,7 +1774,7 @@ Tcl_ForgetImport(
Tcl_Command origin = TclGetOriginalCommand(token);
if (Tcl_GetCommandInfoFromToken(origin, &info) == 0) {
- continue; /* Not an imported command */
+ continue; /* Not an imported command. */
}
if (info.namespacePtr != (Tcl_Namespace *) sourceNsPtr) {
/*
@@ -1918,7 +1918,7 @@ DeleteImportedCmd(
* that refer to it.
*/
- if (prevPtr == NULL) { /* refPtr is first in list */
+ if (prevPtr == NULL) { /* refPtr is first in list. */
realCmdPtr->importRefPtr = refPtr->nextPtr;
} else {
prevPtr->nextPtr = refPtr->nextPtr;
@@ -2536,7 +2536,7 @@ TclResetShadowedCmdRefs(
Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace(interp);
int found, i;
int trailFront = -1;
- int trailSize = 5; /* formerly NUM_TRAIL_ELEMS */
+ int trailSize = 5; /* Formerly NUM_TRAIL_ELEMS. */
Namespace **trailPtr = (Namespace **)
TclStackAlloc(interp, trailSize * sizeof(Namespace *));
@@ -2661,7 +2661,7 @@ TclGetNamespaceFromObj(
ResolvedNsName *resPtr;
Namespace *nsPtr;
int result = TCL_OK;
-
+
/*
* Get the internal representation, converting to a namespace type if
* needed. The internal representation is a ResolvedNsName that points to
@@ -2670,12 +2670,12 @@ TclGetNamespaceFromObj(
* Check the context namespace of the resolved symbol to make sure that it
* is fresh. Note that we verify that the namespace id of the context
* namespace is the same as the one we cached; this insures that the
- * namespace wasn't deleted and a new one created at the same
- * address. Note that fully qualified names have a NULL refNsPtr, these
- * checks needn't be made.
+ * namespace wasn't deleted and a new one created at the same address.
+ * Note that fully qualified names have a NULL refNsPtr, these checks
+ * needn't be made.
*
* If any check fails, then force another conversion to the command type,
- * to discard the old rep and create a new one.
+ * to discard the old rep and create a new one.
*/
resPtr = (ResolvedNsName *) objPtr->internalRep.twoPtrValue.ptr1;
@@ -3720,7 +3720,7 @@ NamespaceInscopeCmd(
for (i = 4; i < objc; i++) {
result = Tcl_ListObjAppendElement(interp, listPtr, objv[i]);
if (result != TCL_OK) {
- Tcl_DecrRefCount(listPtr); /* Free unneeded obj */
+ Tcl_DecrRefCount(listPtr); /* Free unneeded obj. */
return result;
}
}
@@ -3729,7 +3729,7 @@ NamespaceInscopeCmd(
concatObjv[1] = listPtr;
cmdObjPtr = Tcl_ConcatObj(2, concatObjv);
result = Tcl_EvalObjEx(interp, cmdObjPtr, TCL_EVAL_DIRECT);
- Tcl_DecrRefCount(listPtr); /* we're done with the list object */
+ Tcl_DecrRefCount(listPtr); /* We're done with the list object. */
}
if (result == TCL_ERROR) {
@@ -4002,7 +4002,7 @@ NamespacePathCmd(
void
TclSetNsPath(
Namespace *nsPtr, /* Namespace whose path is to be set. */
- int pathLength, /* Length of pathAry */
+ int pathLength, /* Length of pathAry. */
Tcl_Namespace *pathAry[]) /* Array of namespaces that are the path. */
{
NamespacePathEntry *tmpPathArray;
@@ -4487,7 +4487,7 @@ NamespaceUpvarCmd(
}
/*
- * Create the new variable and link it to otherPtr
+ * Create the new variable and link it to otherPtr.
*/
myName = TclGetString(objv[1]);
@@ -4601,7 +4601,7 @@ NamespaceWhichCmd(
static void
FreeNsNameInternalRep(
register Tcl_Obj *objPtr) /* nsName object with internal representation
- * to free */
+ * to free. */
{
register ResolvedNsName *resNamePtr = (ResolvedNsName *)
objPtr->internalRep.twoPtrValue.ptr1;
@@ -4728,7 +4728,7 @@ SetNsNameFromAny(
/*
* Reuse the old ResolvedNsName struct instead of freeing it
*/
-
+
Namespace *oldNsPtr = resNamePtr->nsPtr;
if ((--oldNsPtr->refCount == 0) && (oldNsPtr->flags & NS_DEAD)) {
NamespaceFree(oldNsPtr);
@@ -4736,7 +4736,7 @@ SetNsNameFromAny(
} else {
TclFreeIntRep(objPtr);
resNamePtr = (ResolvedNsName *) ckalloc(sizeof(ResolvedNsName));
- resNamePtr->refCount = 1;
+ resNamePtr->refCount = 1;
objPtr->internalRep.twoPtrValue.ptr1 = (void *) resNamePtr;
objPtr->typePtr = &tclNsNameType;
}
@@ -5997,7 +5997,7 @@ NsEnsembleImplementationCmd(
* the check here, and if we're still valid, we can jump straight
* to the part where we do the invocation of the subcommand.
*/
-
+
if (objv[1]->typePtr == &tclEnsembleCmdType) {
EnsembleCmdRep *ensembleCmd = (EnsembleCmdRep *)
objv[1]->internalRep.otherValuePtr;
@@ -6010,7 +6010,7 @@ NsEnsembleImplementationCmd(
prefixObj = ensembleCmd->realPrefixObj;
Tcl_IncrRefCount(prefixObj);
-
+
runResultingSubcommand:
/*
* Do the real work of execution of the subcommand by
@@ -6029,7 +6029,7 @@ NsEnsembleImplementationCmd(
isRootEnsemble =
(iPtr->ensembleRewrite.sourceObjs == NULL);
copyObj = TclListObjCopy(NULL, prefixObj);
-
+
Tcl_ListObjGetElements(NULL, copyObj, &prefixObjc,
&prefixObjv);
if (isRootEnsemble) {
@@ -6891,14 +6891,14 @@ Tcl_LogCommandInfo(
if (tracePtr->traceProc != EstablishErrorInfoTraces) {
/*
- * The most recent trace set on ::errorInfo is not the one the core
- * itself puts on last. This means some other code is tracing the
- * variable, and the additional trace(s) might be write traces that
- * expect the timing of writes to ::errorInfo that existed Tcl
- * releases before 8.5. To satisfy that compatibility need, we write
- * the current -errorinfo value to the ::errorInfo variable.
+ * The most recent trace set on ::errorInfo is not the one the
+ * core itself puts on last. This means some other code is tracing
+ * the variable, and the additional trace(s) might be write traces
+ * that expect the timing of writes to ::errorInfo that existed
+ * Tcl releases before 8.5. To satisfy that compatibility need, we
+ * write the current -errorinfo value to the ::errorInfo variable.
*/
-
+
Tcl_ObjSetVar2(interp, iPtr->eiVar, NULL,
iPtr->errorInfo, TCL_GLOBAL_ONLY);
}