aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-30 18:47:14 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-30 18:47:14 +0000
commit2393a4999d3cee78abaec1ff3244bd320d59fb97 (patch)
treed2b435ae3897e43c143e7b63628d57d2844cda97 /include/asterisk
parentc5a1e93068a44f79f7e36818fb2ec296000fac40 (diff)
Merged revisions 90310 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90310 | russell | 2007-11-30 12:46:46 -0600 (Fri, 30 Nov 2007) | 2 lines Add some notes on the behavior of ao2_unlink() after a discussion with Tilghman ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90311 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/astobj2.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index bef3c9a79..4c35c4641 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -364,7 +364,24 @@ int ao2_container_count(struct ao2_container *c);
* \note Remember to set the key before calling this function.
*/
void *ao2_link(struct ao2_container *c, void *newobj);
-void *ao2_unlink(struct ao2_container *c, void *newobj);
+/*!
+ * \brief Remove an object from the container
+ *
+ * \arg c the container
+ * \arg obj the object to unlink
+ *
+ * \retval NULL, always
+ *
+ * \note The object requested to be unlinked must be valid. However, if it turns
+ * out that it is not in the container, this function is still safe to
+ * be called.
+ *
+ * \note If the object gets unlinked from the container, the container's
+ * reference to the object will be automatically released. This is
+ * slightly different than ao2_link(), which inherits a reference instead
+ * of automatically increasing the reference count.
+ */
+void *ao2_unlink(struct ao2_container *c, void *obj);
/*! \brief Used as return value if the flag OBJ_MULTIPLE is set */
struct ao2_list {