summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-10-12 10:32:26 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-10-12 10:32:26 -0500
commit765dfdc52953fef59f806599375696fc30a05c6d (patch)
treefd55cc93c577b382af713295a14a335701087044 /include
parent0a54ccf56aaf96386ced28c3a1e5e8c7ab9d3cbf (diff)
parent722d443275c43d5018046d6e333a2f2a8044b2ec (diff)
Merge "astobj2: Add ao2_weakproxy_find function." into 14
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/astobj2.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index b118d2ec0..45863c572 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -1777,6 +1777,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
*
*