summaryrefslogtreecommitdiff
path: root/main/ccss.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2010-04-27 19:52:18 +0000
committerMark Michelson <mmichelson@digium.com>2010-04-27 19:52:18 +0000
commit57c8eea6fe798b22e478c2bc1f8294a9292ff355 (patch)
tree3f9cebffab1df7d1e719ff87955e72b2f896c84c /main/ccss.c
parent28d346dd3494a8d701b2fec31a42d7d6c3f36e26 (diff)
Change cc_ref and cc_unref from macros to inline functions.
The hope is that Solaris won't be as whiny after this change. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@259357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/ccss.c')
-rw-r--r--main/ccss.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/main/ccss.c b/main/ccss.c
index 583c7389c..5430581dd 100644
--- a/main/ccss.c
+++ b/main/ccss.c
@@ -98,8 +98,17 @@ static unsigned int global_cc_max_requests;
*/
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