diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-10-30 10:15:22 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-11-07 07:28:43 -0500 |
commit | 86389893080d86f6437476c3ff6f3fb07ad3bd99 (patch) | |
tree | e2df2c899dc65af3d1b39cfa5821b573c910ae46 /src/lib | |
parent | 5914addcbc5da7ce2ae4e705090ccefd71f27007 (diff) | |
download | tor-86389893080d86f6437476c3ff6f3fb07ad3bd99.tar.gz tor-86389893080d86f6437476c3ff6f3fb07ad3bd99.zip |
Expose get_obj() functions from confmgt.c.
The subsysmgr code wants to use them.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/confmgt/confmgt.c | 4 | ||||
-rw-r--r-- | src/lib/confmgt/confmgt.h | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/confmgt/confmgt.c b/src/lib/confmgt/confmgt.c index 9377736110..1c1a1595ec 100644 --- a/src/lib/confmgt/confmgt.c +++ b/src/lib/confmgt/confmgt.c @@ -237,7 +237,7 @@ config_mgr_get_suite_ptr(const config_mgr_t *mgr, void *toplevel) * to configuration objects for other modules. This function gets * the sub-object for a particular module. */ -STATIC void * +void * config_mgr_get_obj_mutable(const config_mgr_t *mgr, void *toplevel, int idx) { tor_assert(mgr); @@ -256,7 +256,7 @@ config_mgr_get_obj_mutable(const config_mgr_t *mgr, void *toplevel, int idx) } /** As config_mgr_get_obj_mutable(), but return a const pointer. */ -STATIC const void * +const void * config_mgr_get_obj(const config_mgr_t *mgr, const void *toplevel, int idx) { return config_mgr_get_obj_mutable(mgr, (void*)toplevel, idx); diff --git a/src/lib/confmgt/confmgt.h b/src/lib/confmgt/confmgt.h index f565742c55..11f0de03a1 100644 --- a/src/lib/confmgt/confmgt.h +++ b/src/lib/confmgt/confmgt.h @@ -123,13 +123,14 @@ bool config_var_is_listable(const config_var_t *var); #define CFG_EQ_LINELIST(a,b,opt) config_lines_eq((a)->opt, (b)->opt) #define CFG_EQ_ROUTERSET(a,b,opt) routerset_equal((a)->opt, (b)->opt) +void *config_mgr_get_obj_mutable(const config_mgr_t *mgr, + void *toplevel, int idx); +const void *config_mgr_get_obj(const config_mgr_t *mgr, + const void *toplevel, int idx); + #ifdef CONFMGT_PRIVATE STATIC void config_reset_line(const config_mgr_t *mgr, void *options, const char *key, int use_defaults); -STATIC void *config_mgr_get_obj_mutable(const config_mgr_t *mgr, - void *toplevel, int idx); -STATIC const void *config_mgr_get_obj(const config_mgr_t *mgr, - const void *toplevel, int idx); #endif /* defined(CONFMGT_PRIVATE) */ #endif /* !defined(TOR_CONFMGT_H) */ |