[svn-commits] bbryant: branch group/data_api_gsoc2009 r205609 - /team/group/data_api_gsoc20...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jul 9 11:23:05 CDT 2009
Author: bbryant
Date: Thu Jul 9 11:23:02 2009
New Revision: 205609
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205609
Log:
Convert data_filter_get_last_leaf from a macro to an inline function.
Modified:
team/group/data_api_gsoc2009/main/data.c
Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=205609&r1=205608&r2=205609
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Thu Jul 9 11:23:02 2009
@@ -1157,15 +1157,16 @@
* \internal
* \brief XXX-document this
*/
-#define data_filter_get_last_leaf(constpath) ({ \
- char *path = ast_strdupa(constpath), *leaf = NULL, *token; \
- \
- for (token = strtok(path, "/"); token; token = strtok(NULL, ",")) { \
- leaf = token; \
- } \
- \
- (leaf); \
-})
+static inline char *data_filter_get_last_leaf(const char *constpath)
+{
+ char *path = ast_strdupa(constpath), *leaf = NULL, *token;
+
+ for (token = strtok(path, "/"); token; token = strtok(NULL, "/")) {
+ leaf = token;
+ }
+
+ return leaf;
+}
/*!
* \internal
More information about the svn-commits
mailing list