[asterisk-commits] dlee: trunk r388318 - /trunk/include/asterisk/stasis.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 10 10:55:44 CDT 2013
Author: dlee
Date: Fri May 10 10:55:42 2013
New Revision: 388318
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388318
Log:
Avoided __ast names for the private variables created by the
STASIS_MESSAGE_TYPE_*() macros.
Modified:
trunk/include/asterisk/stasis.h
Modified: trunk/include/asterisk/stasis.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/stasis.h?view=diff&rev=388318&r1=388317&r2=388318
==============================================================================
--- trunk/include/asterisk/stasis.h (original)
+++ trunk/include/asterisk/stasis.h Fri May 10 10:55:42 2013
@@ -549,10 +549,10 @@
* \since 12
*/
#define STASIS_MESSAGE_TYPE_DEFN(name) \
- static struct stasis_message_type *__ ## name; \
- struct stasis_message_type *name(void) { \
- ast_assert(__ ## name != NULL); \
- return __ ## name; \
+ static struct stasis_message_type *_priv_ ## name; \
+ struct stasis_message_type *name(void) { \
+ ast_assert(_priv_ ## name != NULL); \
+ return _priv_ ## name; \
}
/*!
@@ -563,16 +563,16 @@
* \return Non-zero on failure.
* \since 12
*/
-#define STASIS_MESSAGE_TYPE_INIT(name) \
- ({ \
- __ ## name = stasis_message_type_create(#name); \
- __ ## name ? 0 : -1; \
+#define STASIS_MESSAGE_TYPE_INIT(name) \
+ ({ \
+ _priv_ ## name = stasis_message_type_create(#name); \
+ _priv_ ## name ? 0 : -1; \
})
-#define STASIS_MESSAGE_TYPE_CLEANUP(name) \
+#define STASIS_MESSAGE_TYPE_CLEANUP(name) \
({ \
- ao2_cleanup(__ ## name); \
- __ ## name = NULL; \
+ ao2_cleanup(_priv_ ## name); \
+ _priv_ ## name = NULL; \
})
/*! @} */
More information about the asterisk-commits
mailing list