mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 00:41:02 +00:00
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
This commit is contained in:
13
main/ccss.c
13
main/ccss.c
@@ -98,8 +98,17 @@ static unsigned int global_cc_max_requests;
|
|||||||
*/
|
*/
|
||||||
static int cc_request_count;
|
static int cc_request_count;
|
||||||
|
|
||||||
#define cc_ref(obj, debug) ({ao2_t_ref((obj), +1, (debug)); (obj);})
|
static inline void *cc_ref(void *obj, const char *debug)
|
||||||
#define cc_unref(obj, debug) ({ao2_t_ref((obj), -1, (debug)); NULL;})
|
{
|
||||||
|
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
|
* \since 1.8
|
||||||
|
Reference in New Issue
Block a user