Changeset 7575


Ignore:
Timestamp:
Jan 2, 2009, 5:11:50 AM (12 years ago)
Author:
charles
Message:
  • add autoconf test AC_C_INLINE to do the Right Thing for "inline", "inline", and "inline".
  • make tr_isAddress(), tr_isDirection(), and a bunch of the tr_torrent() macro functions into true inline functions
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r7497 r7575  
    4848AC_PROG_CC
    4949AC_PROG_CXX
     50AC_C_INLINE
    5051if test "x$GCC" = "xyes" ; then
    5152    CFLAGS="-Wall -Wformat-security -W -Wmissing-prototypes -Wdeclaration-after-statement"
  • trunk/libtransmission/net.h

    r7574 r7575  
    8888void tr_suspectAddress( const tr_address * a, const char * source );
    8989
    90 #define tr_isAddress(a) ( ((a)!=NULL) && ( (a)->type==TR_AF_INET || (a)->type==TR_AF_INET6 ) )
     90static inline tr_bool tr_isAddress( const tr_address * a ) { return ( a != NULL ) && ( a->type==TR_AF_INET || a->type==TR_AF_INET6 ); }
    9191
    9292typedef struct tr_net_af_support
  • trunk/libtransmission/transmission.h

    r7574 r7575  
    14161416
    14171417/** @brief Sanity checker to test that the direction is TR_UP or TR_DOWN */
    1418 #define tr_isDirection(d) (((d)==TR_UP) || ((d)==TR_DOWN))
     1418static inline tr_bool tr_isDirection( tr_direction d ) { return d==TR_UP || d==TR_DOWN; }
    14191419
    14201420/** @} */
Note: See TracChangeset for help on using the changeset viewer.