[svn-commits] russell: branch 1.6.0 r118050 - in /branches/1.6.0: ./ include/asterisk/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 23 07:37:58 CDT 2008


Author: russell
Date: Fri May 23 07:37:58 2008
New Revision: 118050

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118050
Log:
Merged revisions 118049 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r118049 | russell | 2008-05-23 07:37:31 -0500 (Fri, 23 May 2008) | 17 lines

Merged revisions 118048 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118048 | russell | 2008-05-23 07:30:53 -0500 (Fri, 23 May 2008) | 9 lines

Don't declare a function that takes variable arguments as inline, because it's
not valid, and on some compilers, will emit a warning.

http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline

(closes issue #12289)
Reported by: francesco_r
Patches by Tilghman, final patch by me

........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/include/asterisk/utils.h
    branches/1.6.0/main/utils.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/include/asterisk/utils.h?view=diff&rev=118050&r1=118049&r2=118050
==============================================================================
--- branches/1.6.0/include/asterisk/utils.h (original)
+++ branches/1.6.0/include/asterisk/utils.h Fri May 23 07:37:58 2008
@@ -554,21 +554,8 @@
 #define ast_asprintf(ret, fmt, ...) \
 	_ast_asprintf((ret), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, __VA_ARGS__)
 
-AST_INLINE_API(
-__attribute__((format (printf, 5, 6)))
-int _ast_asprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, ...),
-{
-	int res;
-	va_list ap;
-
-	va_start(ap, fmt);
-	if ((res = vasprintf(ret, fmt, ap)) == -1)
-		MALLOC_FAILURE_MSG;
-	va_end(ap);
-
-	return res;
-}
-)
+int __attribute__((format (printf, 5, 6)))
+	_ast_asprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, ...);
 
 /*!
  * \brief A wrapper for vasprintf()

Modified: branches/1.6.0/main/utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/utils.c?view=diff&rev=118050&r1=118049&r2=118050
==============================================================================
--- branches/1.6.0/main/utils.c (original)
+++ branches/1.6.0/main/utils.c Fri May 23 07:37:58 2008
@@ -1576,3 +1576,19 @@
 #endif
 	return 0;
 }
+
+#ifndef __AST_DEBUG_MALLOC
+int _ast_asprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, ...)
+{
+	int res;
+	va_list ap;
+
+	va_start(ap, fmt);
+	if ((res = vasprintf(ret, fmt, ap)) == -1) {
+		MALLOC_FAILURE_MSG;
+	}
+	va_end(ap);
+
+	return res;
+}
+#endif




More information about the svn-commits mailing list