mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Expose get_obj() functions from confmgt.c.
The subsysmgr code wants to use them.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user