Expose get_obj() functions from confmgt.c.

The subsysmgr code wants to use them.
This commit is contained in:
Nick Mathewson
2019-10-30 10:15:22 -04:00
parent 5914addcbc
commit 8638989308
2 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -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);
+5 -4
View File
@@ -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) */