[asterisk-commits] mmichelson: trunk r259357 - /trunk/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 27 14:52:22 CDT 2010


Author: mmichelson
Date: Tue Apr 27 14:52:18 2010
New Revision: 259357

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=259357
Log:
Change cc_ref and cc_unref from macros to inline functions.

The hope is that Solaris won't be as whiny after this change.


Modified:
    trunk/main/ccss.c

Modified: trunk/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/ccss.c?view=diff&rev=259357&r1=259356&r2=259357
==============================================================================
--- trunk/main/ccss.c (original)
+++ trunk/main/ccss.c Tue Apr 27 14:52:18 2010
@@ -98,8 +98,17 @@
  */
 static int cc_request_count;
 
-#define cc_ref(obj, debug) ({ao2_t_ref((obj), +1, (debug)); (obj);})
-#define cc_unref(obj, debug) ({ao2_t_ref((obj), -1, (debug)); NULL;})
+static inline void *cc_ref(void *obj, const char *debug)
+{
+	ao2_t_ref(obj, +1, debug);
+	return obj;
+}
+
+static inline void *cc_unref(void *obj, const char *debug)
+{
+	ao2_t_ref(obj, -1, debug);
+	return NULL;
+}
 
 /*!
  * \since 1.8




More information about the asterisk-commits mailing list