[svn-commits] branch russell/ast_malloc - r7630 /team/russell/ast_malloc/include/asterisk/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Dec 25 20:00:11 CST 2005


Author: russell
Date: Sun Dec 25 20:00:10 2005
New Revision: 7630

URL: http://svn.digium.com/view/asterisk?rev=7630&view=rev
Log:
add doxygen docs

Modified:
    team/russell/ast_malloc/include/asterisk/utils.h

Modified: team/russell/ast_malloc/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/team/russell/ast_malloc/include/asterisk/utils.h?rev=7630&r1=7629&r2=7630&view=diff
==============================================================================
--- team/russell/ast_malloc/include/asterisk/utils.h (original)
+++ team/russell/ast_malloc/include/asterisk/utils.h Sun Dec 25 20:00:10 2005
@@ -237,6 +237,14 @@
 int getloadavg(double *list, int nelem);
 #endif
 
+/*!
+  \brief A wrapper for malloc()
+
+  ast_malloc() is a wrapper for malloc() that will generate an Asterisk log
+  message in the case that the allocation fails.
+
+  The argument and return value are the same as malloc()
+*/
 #define ast_malloc(len) \
 	({ \
 		(_ast_malloc((len), __FILE__, __LINE__, __PRETTY_FUNCTION__)); \
@@ -256,6 +264,14 @@
 }
 )
 
+/*!
+  \brief A wrapper for calloc()
+
+  ast_calloc() is a wrapper for calloc() that will generate an Asterisk log
+  message in the case that the allocation fails.
+
+  The arguments and return value are the same as calloc()
+*/
 #define ast_calloc(num, len) \
 	({ \
 		(_ast_calloc((num), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)); \
@@ -275,6 +291,14 @@
 }
 )
 
+/*!
+  \brief A wrapper for realloc()
+
+  ast_realloc() is a wrapper for realloc() that will generate an Asterisk log
+  message in the case that the allocation fails.
+
+  The arguments and return value are the same as realloc()
+*/
 #define ast_realloc(p, len) \
 	({ \
 		(_ast_realloc((p), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)); \
@@ -294,6 +318,18 @@
 }
 )
 
+/*!
+  \brief A wrapper for strdup()
+
+  ast_strdup() is a wrapper for strdup() that will generate an Asterisk log
+  message in the case that the allocation fails.
+
+  ast_strdup(), unlike strdup(), can safely accept a NULL argument. If a NULL
+  argument is provided, ast_strdup will return NULL without generating any
+  kind of error log message.
+
+  The argument and return value are the same as strdup()
+*/
 #define ast_strdup(str) \
 	({ \
 		(_ast_strdup((str), __FILE__, __LINE__, __PRETTY_FUNCTION__)); \
@@ -315,6 +351,18 @@
 }
 )
 
+/*!
+  \brief A wrapper for strndup()
+
+  ast_strndup() is a wrapper for strndup() that will generate an Asterisk log
+  message in the case that the allocation fails.
+
+  ast_strndup(), unlike strndup(), can safely accept a NULL argument for the
+  string to duplicate. If a NULL argument is provided, ast_strdup will return  
+  NULL without generating any kind of error log message.
+
+  The arguments and return value are the same as strndup()
+*/
 #define ast_strndup(str, len) \
 	({ \
 		(_ast_strndup((str), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)); \



More information about the svn-commits mailing list