[asterisk-commits] dlee: branch dlee/ASTERISK-22243 r396345 - /team/dlee/ASTERISK-22243/include/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 6 15:45:38 CDT 2013


Author: dlee
Date: Tue Aug  6 15:45:36 2013
New Revision: 396345

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396345
Log:
ao2_ref1 tweaks

Modified:
    team/dlee/ASTERISK-22243/include/asterisk/astobj2.h

Modified: team/dlee/ASTERISK-22243/include/asterisk/astobj2.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-22243/include/asterisk/astobj2.h?view=diff&rev=396345&r1=396344&r2=396345
==============================================================================
--- team/dlee/ASTERISK-22243/include/asterisk/astobj2.h (original)
+++ team/dlee/ASTERISK-22243/include/asterisk/astobj2.h Tue Aug  6 15:45:36 2013
@@ -516,14 +516,14 @@
  * This is useful for inlining a ref bump, and you don't care about the ref
  * count.
  *
- * \param obj AO2 object
+ * \param obj AO2 object to bump the refcount on.
  * \retval The given \a obj pointer.
  */
-#define ao2_ref1(obj)				\
-	({					\
-		typeof(obj) __obj = (obj);	\
-		ao2_ref(__obj, +1);		\
-		__obj;				\
+#define ao2_ref1(obj)					\
+	({						\
+		typeof(obj) __obj_ ## __LINE__ = (obj);	\
+		ao2_ref(__obj_ ## __LINE__, +1);	\
+		__obj_ ## __LINE__;			\
 	})
 
 int __ao2_ref_debug(void *o, int delta, const char *tag, const char *file, int line, const char *func);




More information about the asterisk-commits mailing list