diff options
Diffstat (limited to 'generic/tclOOInt.h')
| -rw-r--r-- | generic/tclOOInt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index ed98af7..851623d 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -619,12 +619,12 @@ MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr); /* * A variation where the array is an array of structs. There's no issue with * possible NULLs; every element of the array will be iterated over and the - * varable set to a pointer to each of those elements in turn. - * REQUIRES DECLARATION: int i; + * variable set to a pointer to each of those elements in turn. + * REQUIRES DECLARATION: int i; See [96551aca55] for more FOREACH_STRUCT details. */ #define FOREACH_STRUCT(var,ary) \ - for(i=0 ; var=&((ary).list[i]), i<(ary).num; i++) + if (i=0, (ary).num>0) for(; var=&((ary).list[i]), i<(ary).num; i++) /* * Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS |
