diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-10-18 17:38:07 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-10-18 17:38:07 +0000 |
commit | 95514b32a559c85cc5933f411035468b12ade68f (patch) | |
tree | 3bc8c72371c1786c440c2478cf07b95713c6fe76 | |
parent | d8daa910a66ccfbd25afa57e22e1a77090a8bb5c (diff) | |
download | tor-95514b32a559c85cc5933f411035468b12ade68f.tar.gz tor-95514b32a559c85cc5933f411035468b12ade68f.zip |
Make smartlist_foreach always use the fast versions.
svn:r5275
-rw-r--r-- | src/common/container.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/container.h b/src/common/container.h index b36e85b2d2..99f6aa4bb5 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -100,11 +100,11 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join, */ #define SMARTLIST_FOREACH(sl, type, var, cmd) \ do { \ - int var ## _sl_idx, var ## _sl_len=smartlist_len(sl); \ + int var ## _sl_idx, var ## _sl_len=(sl)->num_used; \ type var; \ for (var ## _sl_idx = 0; var ## _sl_idx < var ## _sl_len; \ ++var ## _sl_idx) { \ - var = smartlist_get((sl),var ## _sl_idx); \ + var = (sl)->list[var ## _sl_idx]; \ cmd; \ } } while (0) |