[asterisk-commits] russell: trunk r90311 - in /trunk: ./ include/asterisk/astobj2.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 30 12:47:14 CST 2007


Author: russell
Date: Fri Nov 30 12:47:14 2007
New Revision: 90311

URL: http://svn.digium.com/view/asterisk?view=rev&rev=90311
Log:
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

........

Modified:
    trunk/   (props changed)
    trunk/include/asterisk/astobj2.h

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/include/asterisk/astobj2.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/astobj2.h?view=diff&rev=90311&r1=90310&r2=90311
==============================================================================
--- trunk/include/asterisk/astobj2.h (original)
+++ trunk/include/asterisk/astobj2.h Fri Nov 30 12:47:14 2007
@@ -364,7 +364,24 @@
  * \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 {




More information about the asterisk-commits mailing list