diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-26 12:13:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-26 12:13:23 -0400 |
commit | b1de1e7a77275ad3e8a65d984ff1e9779920e933 (patch) | |
tree | 1820cbdd2b983630cb0002bfc140a63f89af79c5 /src/lib/log | |
parent | 860b9a991879c5be2b32cf98766adf5fdd349d41 (diff) | |
download | tor-b1de1e7a77275ad3e8a65d984ff1e9779920e933.tar.gz tor-b1de1e7a77275ad3e8a65d984ff1e9779920e933.zip |
Extract core part of smartlist code into its own library.
The smartlist_core library now contains only the parts of smartlists
that are needed for the logging library. This resolves the
circularity between "container" and "log".
The "containers" library still uses the logging code, and has the
higher-level smartlist functions.
Diffstat (limited to 'src/lib/log')
-rw-r--r-- | src/lib/log/.may_include | 2 | ||||
-rw-r--r-- | src/lib/log/torlog.c | 6 | ||||
-rw-r--r-- | src/lib/log/util_bug.c | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/log/.may_include b/src/lib/log/.may_include index 36a164cce0..852173aab3 100644 --- a/src/lib/log/.may_include +++ b/src/lib/log/.may_include @@ -1,7 +1,7 @@ orconfig.h lib/cc/*.h -lib/container/smartlist.h +lib/smartlist_core/*.h lib/err/*.h lib/fdio/*.h lib/intmath/*.h diff --git a/src/lib/log/torlog.c b/src/lib/log/torlog.c index 5709dd8199..bffffbf1bd 100644 --- a/src/lib/log/torlog.c +++ b/src/lib/log/torlog.c @@ -5,7 +5,7 @@ /* See LICENSE for licensing information */ /** - * \file log.c + * \file torlog.c * \brief Functions to send messages to log files or the console. **/ @@ -34,7 +34,9 @@ #include "lib/log/torlog.h" #include "lib/log/ratelim.h" #include "lib/lock/compat_mutex.h" -#include "lib/container/smartlist.h" +#include "lib/smartlist_core/smartlist_core.h" +#include "lib/smartlist_core/smartlist_foreach.h" +#include "lib/smartlist_core/smartlist_split.h" #include "lib/err/torerr.h" #include "lib/intmath/bits.h" #include "lib/string/compat_string.h" diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c index 161b65e0bf..78af08f022 100644 --- a/src/lib/log/util_bug.c +++ b/src/lib/log/util_bug.c @@ -12,7 +12,8 @@ #include "lib/log/torlog.h" #include "lib/err/backtrace.h" #ifdef TOR_UNIT_TESTS -#include "lib/container/smartlist.h" +#include "lib/smartlist_core/smartlist_core.h" +#include "lib/smartlist_core/smartlist_foreach.h" #endif #include "lib/malloc/util_malloc.h" #include "lib/string/printf.h" |