freetdm: make array len macro public

This commit is contained in:
Moises Silva 2010-06-30 15:39:02 -04:00
parent 6eca1286aa
commit 84f2249ecc
2 changed files with 3 additions and 2 deletions

View File

@ -67,6 +67,9 @@ extern "C" {
/*! \brief check for zero length string buffer */
#define ftdm_strlen_zero_buf(s) (*s == '\0')
/*! \brief array len helper */
#define ftdm_array_len(array) sizeof(array)/sizeof(array[0])
/*! \brief The memory handler.
Do not use directly this variable, use the memory macros and ftdm_global_set_memory_handler to override */
FT_DECLARE_DATA extern ftdm_memory_handler_t g_ftdm_mem_handler;

View File

@ -589,8 +589,6 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons
*/
#define ftdm_socket_close(it) if (it > -1) { close(it); it = -1;}
#define ftdm_array_len(array) sizeof(array)/sizeof(array[0])
#define ftdm_channel_lock(chan) ftdm_mutex_lock(chan->mutex)
#define ftdm_channel_unlock(chan) ftdm_mutex_unlock(chan->mutex)
#define ftdm_log_chan_ex(fchan, file, func, line, level, format, ...) ftdm_log(file, func, line, level, "[s%dc%d][%d:%d] " format, fchan->span_id, fchan->chan_id, fchan->physical_span_id, fchan->physical_chan_id, __VA_ARGS__)