diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-10-12 09:26:29 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-10-12 09:26:29 -0500 |
commit | b94f2343a61214afa8185a749befe39f001b1821 (patch) | |
tree | d745d2b57d430f9088e8b4dcaf3c5462cb0c1526 /include/asterisk | |
parent | 3affeac39d292811eb803f4f77f8132cc72424e7 (diff) | |
parent | b058f8673aa9d82504bd357dd49f8ec1ba61a47e (diff) |
Merge "astobj2: Add ao2_weakproxy_find function."
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/astobj2.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h index 9b5ec123b..a18f099c0 100644 --- a/include/asterisk/astobj2.h +++ b/include/asterisk/astobj2.h @@ -1775,6 +1775,17 @@ void *__ao2_callback_data(struct ao2_container *c, enum search_flags flags, void *__ao2_find(struct ao2_container *c, const void *arg, enum search_flags flags, const char *tag, const char *file, int line, const char *func); +/*! + * \brief Perform an ao2_find on a container with ao2_weakproxy objects, returning the real object. + * + * \note Only OBJ_SEARCH_* and OBJ_NOLOCK flags are supported by this function. + * \see ao2_callback for description of arguments. + */ +#define ao2_weakproxy_find(c, arg, flags, tag) \ + __ao2_weakproxy_find(c, arg, flags, tag, __FILE__, __LINE__, __PRETTY_FUNCTION__) +void *__ao2_weakproxy_find(struct ao2_container *c, const void *arg, enum search_flags flags, + const char *tag, const char *file, int line, const char *func); + /*! \brief * * |