[asterisk-commits] russell: branch russell/iax_refcount r80289 - /team/russell/iax_refcount/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 22 12:08:53 CDT 2007
Author: russell
Date: Wed Aug 22 12:08:52 2007
New Revision: 80289
URL: http://svn.digium.com/view/asterisk?view=rev&rev=80289
Log:
make INTERNAL_OBJ an inline function
Modified:
team/russell/iax_refcount/main/astobj2.c
Modified: team/russell/iax_refcount/main/astobj2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax_refcount/main/astobj2.c?view=diff&rev=80289&r1=80288&r2=80289
==============================================================================
--- team/russell/iax_refcount/main/astobj2.c (original)
+++ team/russell/iax_refcount/main/astobj2.c Wed Aug 22 12:08:52 2007
@@ -91,22 +91,22 @@
* From a pointer _p to a user-defined object,
* return the pointer to the astobj2 structure
*/
-//static inline struct astobj2 *INTERNAL_OBJ(void *user_data)
-#define INTERNAL_OBJ(user_data) \
-({\
- struct astobj2 *p;\
-\
- if (user_data == NULL) {\
- ao2_bt();\
- assert(user_data != NULL);\
- }\
- p = (struct astobj2 *)((char *)(user_data) - sizeof(struct astobj2));\
- if (AO2_MAGIC != (p->priv_data.magic) ) {\
- ast_verbose("----!!!!!--------- bad magic number 0x%x for %p\n", p->priv_data.magic, p);\
- p = NULL;\
- }\
- (p);\
-})
+static inline struct astobj2 *INTERNAL_OBJ(void *user_data)
+{
+ struct astobj2 *p;
+
+ if (user_data == NULL) {
+ ao2_bt();
+ assert(user_data != NULL);
+ }
+ p = (struct astobj2 *)((char *)(user_data) - sizeof(struct astobj2));
+ if (AO2_MAGIC != (p->priv_data.magic) ) {
+ ast_verbose("----!!!!!--------- bad magic number 0x%x for %p\n", p->priv_data.magic, p);
+ p = NULL;
+ }
+
+ return p;
+}
/*
* From a pointer _p to an astobj2 object,
@@ -510,7 +510,6 @@
int lim;
struct bucket_list *p = NULL;
- // ast_verbose("ao2_iterator a %p a->c %p\n", a, a->c);
if (INTERNAL_OBJ(a->c) == NULL)
return NULL;
if (!(a->flags & F_AO2I_DONTLOCK))
More information about the asterisk-commits
mailing list