[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Expose get_obj() functions from confmgt.c.
commit 86389893080d86f6437476c3ff6f3fb07ad3bd99
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Wed Oct 30 10:15:22 2019 -0400
Expose get_obj() functions from confmgt.c.
The subsysmgr code wants to use them.
---
src/lib/confmgt/confmgt.c | 4 ++--
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 937773611..1c1a1595e 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 f565742c5..11f0de03a 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) */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits