diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-11-16 11:17:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-11-16 11:17:54 (GMT) |
commit | 5534478fa10a116663a3b05f32a119bb07aa9ed2 (patch) | |
tree | b647149ae02bb75b31d2ac1b36cbd503bf42855c /generic/tclNamesp.c | |
parent | de0ff2272ed178a1fba979435ced086cecb968fa (diff) | |
parent | 7dec4a7fc516a50bac5f55f6752b646254ba1082 (diff) | |
download | tcl-5534478fa10a116663a3b05f32a119bb07aa9ed2.zip tcl-5534478fa10a116663a3b05f32a119bb07aa9ed2.tar.gz tcl-5534478fa10a116663a3b05f32a119bb07aa9ed2.tar.bz2 |
re-base "novem-more-memory-API" to trunk. TIP not submitted yet, but upcoming.
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index e1bad0e..054fd72 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -52,7 +52,7 @@ static Tcl_ThreadDataKey dataKey; * with some information that is used to check the cached pointer's validity. */ -typedef struct ResolvedNsName { +typedef struct { Namespace *nsPtr; /* A cached pointer to the Namespace that the * name resolved to. */ Namespace *refNsPtr; /* Points to the namespace context in which @@ -1105,7 +1105,7 @@ TclTeardownNamespace( Interp *iPtr = (Interp *) nsPtr->interp; register Tcl_HashEntry *entryPtr; Tcl_HashSearch search; - int i; + size_t i; /* * Start by destroying the namespace's variable table, since variables @@ -1126,7 +1126,7 @@ TclTeardownNamespace( */ while (nsPtr->cmdTable.numEntries > 0) { - int length = nsPtr->cmdTable.numEntries; + size_t length = nsPtr->cmdTable.numEntries; Command **cmds = TclStackAlloc((Tcl_Interp *) iPtr, sizeof(Command *) * length); @@ -1198,7 +1198,7 @@ TclTeardownNamespace( #ifndef BREAK_NAMESPACE_COMPAT while (nsPtr->childTable.numEntries > 0) { - int length = nsPtr->childTable.numEntries; + size_t length = nsPtr->childTable.numEntries; Namespace **children = TclStackAlloc((Tcl_Interp *) iPtr, sizeof(Namespace *) * length); @@ -1371,7 +1371,7 @@ Tcl_Export( Namespace *currNsPtr = (Namespace *) TclGetCurrentNamespace(interp); const char *simplePattern; char *patternCpy; - int neededElems, len, i; + size_t neededElems, len, i; /* * If the specified namespace is NULL, use the current namespace. @@ -1498,7 +1498,8 @@ Tcl_AppendExportList( * export pattern list is appended. */ { Namespace *nsPtr; - int i, result; + size_t i; + int result; /* * If the specified namespace is NULL, use the current namespace. @@ -1700,7 +1701,7 @@ DoImport( Namespace *importNsPtr, int allowOverwrite) { - int i = 0, exported = 0; + size_t i = 0, exported = 0; Tcl_HashEntry *found; /* |