* make tr_isAddress(), tr_isDirection(), and a bunch of the tr_torrent() macro functions into true inline functions
AC_PROG_CC
AC_PROG_CXX
+AC_C_INLINE
if test "x$GCC" = "xyes" ; then
CFLAGS="-Wall -Wformat-security -W -Wmissing-prototypes -Wdeclaration-after-statement"
CXXFLAGS="-Wall -Wformat-security -W"
void tr_suspectAddress( const tr_address * a, const char * source );
-#define tr_isAddress(a) ( ((a)!=NULL) && ( (a)->type==TR_AF_INET || (a)->type==TR_AF_INET6 ) )
+static inline tr_bool tr_isAddress( const tr_address * a ) { return ( a != NULL ) && ( a->type==TR_AF_INET || a->type==TR_AF_INET6 ); }
typedef struct tr_net_af_support
{
time_t doneDate );
/** @brief Sanity checker to test that the direction is TR_UP or TR_DOWN */
-#define tr_isDirection(d) (((d)==TR_UP) || ((d)==TR_DOWN))
+static inline tr_bool tr_isDirection( tr_direction d ) { return d==TR_UP || d==TR_DOWN; }
/** @} */