diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-27 19:52:18 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-27 19:52:18 +0000 |
commit | 28545902b3c2f57bd0e4f22fae89582e9e5745b6 (patch) | |
tree | 3f9cebffab1df7d1e719ff87955e72b2f896c84c /main/ccss.c | |
parent | 34e150d831bac13d507ebc5f1d71c7187f92228a (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: http://svn.digium.com/svn/asterisk/trunk@259357 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ccss.c')
-rw-r--r-- | main/ccss.c | 13 |
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 |