Changeset 9847


Ignore:
Timestamp:
Jan 1, 2010, 10:26:35 PM (12 years ago)
Author:
charles
Message:

(trunk libT) replace the TR_INLINE macro with the standard "inline" keyword, since we require inline functions anyway

Location:
trunk/libtransmission
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bandwidth.c

    r9671 r9847  
    7272******/
    7373
    74 static TR_INLINE int
     74static inline int
    7575comparePointers( const void * a, const void * b )
    7676{
  • trunk/libtransmission/bandwidth.h

    r9671 r9847  
    124124
    125125/** @brief create a new tr_bandwidth object */
    126 static TR_INLINE tr_bandwidth* tr_bandwidthNew( tr_session * session, tr_bandwidth * parent )
     126static inline tr_bandwidth* tr_bandwidthNew( tr_session * session, tr_bandwidth * parent )
    127127{
    128128    return tr_bandwidthConstruct( tr_new0( tr_bandwidth, 1 ), session, parent );
     
    132132
    133133/** @brief free a tr_bandwidth object */
    134 static TR_INLINE void tr_bandwidthFree( tr_bandwidth * bandwidth )
     134static inline void tr_bandwidthFree( tr_bandwidth * bandwidth )
    135135{
    136136    tr_free( tr_bandwidthDestruct( bandwidth ) );
     
    138138
    139139/** @brief test to see if the pointer refers to a live bandwidth object */
    140 static TR_INLINE tr_bool tr_isBandwidth( const tr_bandwidth  * b )
     140static inline tr_bool tr_isBandwidth( const tr_bandwidth  * b )
    141141{
    142142    return ( b != NULL ) && ( b->magicNumber == MAGIC_NUMBER );
     
    152152 * @see tr_bandwidthGetDesiredSpeed
    153153 */
    154 static TR_INLINE tr_bool tr_bandwidthSetDesiredSpeed( tr_bandwidth        * bandwidth,
     154static inline tr_bool tr_bandwidthSetDesiredSpeed( tr_bandwidth        * bandwidth,
    155155                                                      tr_direction          dir,
    156156                                                      double                desiredSpeed )
     
    166166 * @see tr_bandwidthSetDesiredSpeed
    167167 */
    168 static TR_INLINE double
     168static inline double
    169169tr_bandwidthGetDesiredSpeed( const tr_bandwidth  * bandwidth,
    170170                             tr_direction          dir )
     
    176176 * @brief Set whether or not this bandwidth should throttle its peer-io's speeds
    177177 */
    178 static TR_INLINE tr_bool tr_bandwidthSetLimited( tr_bandwidth        * bandwidth,
     178static inline tr_bool tr_bandwidthSetLimited( tr_bandwidth        * bandwidth,
    179179                                                 tr_direction          dir,
    180180                                                 tr_bool               isLimited )
     
    189189 * @return nonzero if this bandwidth throttles its peer-ios speeds
    190190 */
    191 static TR_INLINE tr_bool tr_bandwidthIsLimited( const tr_bandwidth  * bandwidth,
     191static inline tr_bool tr_bandwidthIsLimited( const tr_bandwidth  * bandwidth,
    192192                                                tr_direction          dir )
    193193{
     
    245245 * in that particular case we want to ignore the global speed limit...
    246246 */
    247 static TR_INLINE tr_bool tr_bandwidthHonorParentLimits ( tr_bandwidth        * bandwidth,
     247static inline tr_bool tr_bandwidthHonorParentLimits ( tr_bandwidth        * bandwidth,
    248248                                                         tr_direction          direction,
    249249                                                         tr_bool               isEnabled )
     
    255255}
    256256
    257 static TR_INLINE tr_bool tr_bandwidthAreParentLimitsHonored( tr_bandwidth  * bandwidth,
     257static inline tr_bool tr_bandwidthAreParentLimitsHonored( tr_bandwidth  * bandwidth,
    258258                                                             tr_direction    direction )
    259259{
  • trunk/libtransmission/bencode.c

    r9671 r9847  
    355355
    356356/* returns true if the given string length would fit in our string buffer */
    357 static TR_INLINE int
     357static inline int
    358358stringFitsInBuffer( const tr_benc * val, int len )
    359359{
     
    363363/* returns true if the benc's string was malloced.
    364364 * this occurs when the string is too long for our string buffer */
    365 static TR_INLINE int
     365static inline int
    366366stringIsAlloced( const tr_benc * val )
    367367{
     
    370370
    371371/* returns a const pointer to the benc's string */
    372 static TR_INLINE const char*
     372static inline const char*
    373373getStr( const tr_benc* val )
    374374{
  • trunk/libtransmission/bencode.h

    r9671 r9847  
    204204tr_bool   tr_bencGetReal( const tr_benc * val, double * setme );
    205205
    206 static TR_INLINE tr_bool tr_bencIsType  ( const tr_benc * b, int type ) { return ( b != NULL ) && ( b->type == type ); }
    207 static TR_INLINE tr_bool tr_bencIsInt   ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_INT ); }
    208 static TR_INLINE tr_bool tr_bencIsDict  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_DICT ); }
    209 static TR_INLINE tr_bool tr_bencIsList  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_LIST ); }
    210 static TR_INLINE tr_bool tr_bencIsString( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_STR ); }
    211 static TR_INLINE tr_bool tr_bencIsBool  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_BOOL ); }
    212 static TR_INLINE tr_bool tr_bencIsReal  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_REAL ); }
     206static inline tr_bool tr_bencIsType  ( const tr_benc * b, int type ) { return ( b != NULL ) && ( b->type == type ); }
     207static inline tr_bool tr_bencIsInt   ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_INT ); }
     208static inline tr_bool tr_bencIsDict  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_DICT ); }
     209static inline tr_bool tr_bencIsList  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_LIST ); }
     210static inline tr_bool tr_bencIsString( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_STR ); }
     211static inline tr_bool tr_bencIsBool  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_BOOL ); }
     212static inline tr_bool tr_bencIsReal  ( const tr_benc * b ) { return tr_bencIsType( b, TR_TYPE_REAL ); }
    213213
    214214/**
  • trunk/libtransmission/bitfield.h

    r9671 r9847  
    3333tr_bitfield* tr_bitfieldDestruct( tr_bitfield* );
    3434
    35 static TR_INLINE tr_bitfield* tr_bitfieldNew( size_t bitcount )
     35static inline tr_bitfield* tr_bitfieldNew( size_t bitcount )
    3636{
    3737    return tr_bitfieldConstruct( tr_new0( tr_bitfield, 1 ), bitcount );
    3838}
    3939
    40 static TR_INLINE void tr_bitfieldFree( tr_bitfield * b )
     40static inline void tr_bitfieldFree( tr_bitfield * b )
    4141{
    4242    tr_free( tr_bitfieldDestruct( b ) );
     
    6868    need to call tr_bitfieldTestFast() first before you
    6969    start looping. */
    70 static TR_INLINE tr_bool tr_bitfieldHasFast( const tr_bitfield * b, const size_t nth )
     70static inline tr_bool tr_bitfieldHasFast( const tr_bitfield * b, const size_t nth )
    7171{
    7272    return ( b->bits[nth>>3u] << ( nth & 7u ) & 0x80 ) != 0;
     
    7474
    7575/** @param high the highest nth bit you're going to access */
    76 static TR_INLINE tr_bool tr_bitfieldTestFast( const tr_bitfield * b, const size_t high )
     76static inline tr_bool tr_bitfieldTestFast( const tr_bitfield * b, const size_t high )
    7777{
    7878    return ( b != NULL )
     
    8181}
    8282
    83 static TR_INLINE tr_bool tr_bitfieldHas( const tr_bitfield * b, size_t nth )
     83static inline tr_bool tr_bitfieldHas( const tr_bitfield * b, size_t nth )
    8484{
    8585    return tr_bitfieldTestFast( b, nth ) && tr_bitfieldHasFast( b, nth );
  • trunk/libtransmission/bitset.h

    r9671 r9847  
    3030tr_bitset;
    3131
    32 static TR_INLINE void
     32static inline void
    3333tr_bitsetConstructor( tr_bitset * b, int size )
    3434{
     
    3636}
    3737
    38 static TR_INLINE void
     38static inline void
    3939tr_bitsetDestructor( tr_bitset * b )
    4040{
     
    4242}
    4343
    44 static TR_INLINE void
     44static inline void
    4545tr_bitsetReserve( tr_bitset * b, size_t size )
    4646{
     
    5757}
    5858
    59 static TR_INLINE tr_bool
     59static inline tr_bool
    6060tr_bitsetHasFast( const tr_bitset * b, const size_t nth )
    6161{
     
    6666}
    6767
    68 static TR_INLINE tr_bool
     68static inline tr_bool
    6969tr_bitsetHas( const tr_bitset * b, const size_t nth )
    7070{
     
    7575}
    7676
    77 static TR_INLINE void
     77static inline void
    7878tr_bitsetOr( tr_bitfield * a, const tr_bitset * b )
    7979{
     
    8585
    8686/* set 'a' to all the flags that were in 'a' but not 'b' */
    87 static TR_INLINE void
     87static inline void
    8888tr_bitsetDifference( tr_bitfield * a, const tr_bitset * b )
    8989{
     
    9494}
    9595
    96 static TR_INLINE double
     96static inline double
    9797tr_bitsetPercent( const tr_bitset * b )
    9898{
     
    103103}
    104104
    105 static TR_INLINE void
     105static inline void
    106106tr_bitsetSetHaveAll( tr_bitset * b )
    107107{
     
    110110}
    111111
    112 static TR_INLINE void
     112static inline void
    113113tr_bitsetSetHaveNone( tr_bitset * b )
    114114{
     
    117117}
    118118
    119 static TR_INLINE int
     119static inline int
    120120tr_bitsetAdd( tr_bitset * b, int i )
    121121{
  • trunk/libtransmission/completion.h

    r9671 r9847  
    6363tr_completion * tr_cpDestruct( tr_completion * );
    6464
    65 static TR_INLINE tr_completion* tr_cpNew( tr_torrent * tor )
     65static inline tr_completion* tr_cpNew( tr_torrent * tor )
    6666{
    6767    return tr_cpConstruct( tr_new0( tr_completion, 1 ), tor );
    6868}
    6969
    70 static TR_INLINE void tr_cpFree( tr_completion * cp )
     70static inline void tr_cpFree( tr_completion * cp )
    7171{
    7272    tr_free( tr_cpDestruct( cp ) );
     
    8989                                               int                     tabCount );
    9090
    91 static TR_INLINE uint64_t tr_cpHaveTotal( const tr_completion * cp )
     91static inline uint64_t tr_cpHaveTotal( const tr_completion * cp )
    9292{
    9393    return cp->sizeNow;
    9494}
    9595
    96 static TR_INLINE uint64_t tr_cpLeftUntilComplete( const tr_completion * cp )
     96static inline uint64_t tr_cpLeftUntilComplete( const tr_completion * cp )
    9797{
    9898    return tr_torrentInfo(cp->tor)->totalSize - cp->sizeNow;
    9999}
    100100
    101 static TR_INLINE uint64_t tr_cpLeftUntilDone( const tr_completion * cp )
     101static inline uint64_t tr_cpLeftUntilDone( const tr_completion * cp )
    102102{
    103103    return tr_cpSizeWhenDone( cp ) - cp->sizeNow;
    104104}
    105105
    106 static TR_INLINE float tr_cpPercentComplete( const tr_completion * cp )
     106static inline float tr_cpPercentComplete( const tr_completion * cp )
    107107{
    108108    const double ratio = tr_getRatio( cp->sizeNow, tr_torrentInfo(cp->tor)->totalSize );
     
    115115}
    116116
    117 static TR_INLINE float tr_cpPercentDone( const tr_completion * cp )
     117static inline float tr_cpPercentDone( const tr_completion * cp )
    118118{
    119119    const double ratio = tr_getRatio( cp->sizeNow, tr_cpSizeWhenDone( cp ) );
     
    143143**/
    144144
    145 static TR_INLINE tr_bool tr_cpBlockIsCompleteFast( const tr_completion * cp, tr_block_index_t block )
     145static inline tr_bool tr_cpBlockIsCompleteFast( const tr_completion * cp, tr_block_index_t block )
    146146{
    147147    return tr_bitfieldHasFast( &cp->blockBitfield, block );
    148148}
    149149
    150 static TR_INLINE tr_bool tr_cpBlockIsComplete( const tr_completion * cp, tr_block_index_t block )
     150static inline tr_bool tr_cpBlockIsComplete( const tr_completion * cp, tr_block_index_t block )
    151151{
    152152    return tr_bitfieldHas( &cp->blockBitfield, block );
     
    163163***/
    164164
    165 static TR_INLINE const struct tr_bitfield * tr_cpPieceBitfield( const tr_completion * cp ) {
     165static inline const struct tr_bitfield * tr_cpPieceBitfield( const tr_completion * cp ) {
    166166    return &cp->pieceBitfield;
    167167}
    168168
    169 static TR_INLINE const struct tr_bitfield * tr_cpBlockBitfield( const tr_completion * cp ) {
     169static inline const struct tr_bitfield * tr_cpBlockBitfield( const tr_completion * cp ) {
    170170    assert( cp );
    171171    assert( cp->blockBitfield.bits );
  • trunk/libtransmission/fdlimit.c

    r9825 r9847  
    404404}
    405405
    406 static TR_INLINE tr_bool
     406static inline tr_bool
    407407fileIsOpen( const struct tr_openfile * o )
    408408{
  • trunk/libtransmission/list.h

    r9671 r9847  
    1818#define TR_LIST_H
    1919
    20 #include "transmission.h" /* TR_INLINE */
     20#include "transmission.h" /* inline */
    2121
    2222typedef struct tr_list
     
    8383 * Init @head as an empty list.
    8484 */
    85 static TR_INLINE void
     85static inline void
    8686__tr_list_init( struct __tr_list * head )
    8787{
     
    115115 * Append @list to the end of @head.
    116116 */
    117 static TR_INLINE void
     117static inline void
    118118__tr_list_append( struct __tr_list * head,
    119119                  struct __tr_list * list)
  • trunk/libtransmission/net.h

    r9778 r9847  
    9292tr_bool tr_isValidPeerAddress( const tr_address * addr, tr_port port );
    9393
    94 static TR_INLINE tr_bool tr_isAddress( const tr_address * a ) { return ( a != NULL ) && ( a->type==TR_AF_INET || a->type==TR_AF_INET6 ); }
     94static inline tr_bool tr_isAddress( const tr_address * a ) { return ( a != NULL ) && ( a->type==TR_AF_INET || a->type==TR_AF_INET6 ); }
    9595
    9696tr_bool tr_net_hasIPv6( tr_port );
  • trunk/libtransmission/peer-io.h

    r9671 r9847  
    152152void        tr_peerIoEnableLTEP( tr_peerIo * io, tr_bool flag );
    153153
    154 static TR_INLINE tr_bool tr_peerIoSupportsLTEP( const tr_peerIo * io )
     154static inline tr_bool tr_peerIoSupportsLTEP( const tr_peerIo * io )
    155155{
    156156    assert( tr_isPeerIo( io ) );
     
    161161void        tr_peerIoEnableFEXT( tr_peerIo * io, tr_bool flag );
    162162
    163 static TR_INLINE tr_bool tr_peerIoSupportsFEXT( const tr_peerIo * io )
     163static inline tr_bool tr_peerIoSupportsFEXT( const tr_peerIo * io )
    164164{
    165165    assert( tr_isPeerIo( io ) );
     
    170170void        tr_peerIoEnableDHT( tr_peerIo * io, tr_bool flag );
    171171
    172 static TR_INLINE tr_bool tr_peerIoSupportsDHT( const tr_peerIo * io )
     172static inline tr_bool tr_peerIoSupportsDHT( const tr_peerIo * io )
    173173{
    174174    assert( tr_isPeerIo( io ) );
     
    181181**/
    182182
    183 static TR_INLINE tr_session* tr_peerIoGetSession ( tr_peerIo * io )
     183static inline tr_session* tr_peerIoGetSession ( tr_peerIo * io )
    184184{
    185185    assert( tr_isPeerIo( io ) );
     
    192192                              tr_port                   port );
    193193
    194 static TR_INLINE const char* tr_peerIoGetAddrStr( const tr_peerIo * io )
     194static inline const char* tr_peerIoGetAddrStr( const tr_peerIo * io )
    195195{
    196196    return tr_isPeerIo( io ) ? tr_peerIoAddrStr( &io->addr, io->port ) : "error";
     
    209209int                  tr_peerIoReconnect( tr_peerIo * io );
    210210
    211 static TR_INLINE tr_bool tr_peerIoIsIncoming( const tr_peerIo * io )
     211static inline tr_bool tr_peerIoIsIncoming( const tr_peerIo * io )
    212212{
    213213    return io->isIncoming;
    214214}
    215215
    216 static TR_INLINE int    tr_peerIoGetAge( const tr_peerIo * io )
     216static inline int    tr_peerIoGetAge( const tr_peerIo * io )
    217217{
    218218    return time( NULL ) - io->timeCreated;
     
    227227                                          const uint8_t * peer_id );
    228228
    229 static TR_INLINE const uint8_t* tr_peerIoGetPeersId( const tr_peerIo * io )
     229static inline const uint8_t* tr_peerIoGetPeersId( const tr_peerIo * io )
    230230{
    231231    assert( tr_isPeerIo( io ) );
     
    264264**/
    265265
    266 static TR_INLINE struct tr_crypto * tr_peerIoGetCrypto( tr_peerIo * io )
     266static inline struct tr_crypto * tr_peerIoGetCrypto( tr_peerIo * io )
    267267{
    268268    return io->crypto;
     
    280280                                  int         encryptionMode );
    281281
    282 static TR_INLINE tr_bool tr_peerIoIsEncrypted( const tr_peerIo * io )
     282static inline tr_bool tr_peerIoIsEncrypted( const tr_peerIo * io )
    283283{
    284284    return ( io != NULL ) && ( io->encryptionMode == PEER_ENCRYPTION_RC4 );
    285285}
    286286
    287 static TR_INLINE void tr_peerIoWriteBytes( tr_peerIo        * io UNUSED,
     287static inline void tr_peerIoWriteBytes( tr_peerIo        * io UNUSED,
    288288                                           struct evbuffer  * outbuf,
    289289                                           const void       * bytes,
     
    293293}
    294294
    295 static TR_INLINE void  tr_peerIoWriteUint8( tr_peerIo        * io,
     295static inline void  tr_peerIoWriteUint8( tr_peerIo        * io,
    296296                                            struct evbuffer  * outbuf,
    297297                                            uint8_t            writeme )
     
    300300}
    301301
    302 static TR_INLINE void tr_peerIoWriteUint16( tr_peerIo        * io,
     302static inline void tr_peerIoWriteUint16( tr_peerIo        * io,
    303303                                            struct evbuffer  * outbuf,
    304304                                            uint16_t           writeme )
     
    308308}
    309309
    310 static TR_INLINE void tr_peerIoWriteUint32( tr_peerIo        * io,
     310static inline void tr_peerIoWriteUint32( tr_peerIo        * io,
    311311                                            struct evbuffer  * outbuf,
    312312                                            uint32_t           writeme )
     
    321321                         size_t             byteCount );
    322322
    323 static TR_INLINE void tr_peerIoReadUint8( tr_peerIo        * io,
     323static inline void tr_peerIoReadUint8( tr_peerIo        * io,
    324324                                          struct evbuffer  * inbuf,
    325325                                          uint8_t          * setme )
     
    328328}
    329329
    330 static TR_INLINE void tr_peerIoReadUint16( tr_peerIo        * io,
     330static inline void tr_peerIoReadUint16( tr_peerIo        * io,
    331331                                           struct evbuffer  * inbuf,
    332332                                           uint16_t         * setme )
     
    337337}
    338338
    339 static TR_INLINE void tr_peerIoReadUint32( tr_peerIo        * io,
     339static inline void tr_peerIoReadUint32( tr_peerIo        * io,
    340340                                           struct evbuffer  * inbuf,
    341341                                           uint32_t         * setme )
     
    356356size_t    tr_peerIoGetWriteBufferSpace( const tr_peerIo * io, uint64_t now );
    357357
    358 static TR_INLINE void tr_peerIoSetParent( tr_peerIo            * io,
     358static inline void tr_peerIoSetParent( tr_peerIo            * io,
    359359                                          struct tr_bandwidth  * parent )
    360360{
     
    369369                                  int                   isPieceData );
    370370
    371 static TR_INLINE tr_bool tr_peerIoHasBandwidthLeft( const tr_peerIo  * io,
     371static inline tr_bool tr_peerIoHasBandwidthLeft( const tr_peerIo  * io,
    372372                                                    tr_direction       dir )
    373373{
     
    378378}
    379379
    380 static TR_INLINE double tr_peerIoGetPieceSpeed( const tr_peerIo * io, uint64_t now, tr_direction dir )
     380static inline double tr_peerIoGetPieceSpeed( const tr_peerIo * io, uint64_t now, tr_direction dir )
    381381{
    382382    assert( tr_isPeerIo( io ) );
     
    404404**/
    405405
    406 static TR_INLINE struct evbuffer * tr_peerIoGetReadBuffer( tr_peerIo * io )
     406static inline struct evbuffer * tr_peerIoGetReadBuffer( tr_peerIo * io )
    407407{
    408408    return io->inbuf;
  • trunk/libtransmission/peer-mgr.c

    r9836 r9847  
    215215**/
    216216
    217 static TR_INLINE void
     217static inline void
    218218managerLock( const struct tr_peerMgr * manager )
    219219{
     
    221221}
    222222
    223 static TR_INLINE void
     223static inline void
    224224managerUnlock( const struct tr_peerMgr * manager )
    225225{
     
    227227}
    228228
    229 static TR_INLINE void
     229static inline void
    230230torrentLock( Torrent * torrent )
    231231{
     
    233233}
    234234
    235 static TR_INLINE void
     235static inline void
    236236torrentUnlock( Torrent * torrent )
    237237{
     
    239239}
    240240
    241 static TR_INLINE int
     241static inline int
    242242torrentIsLocked( const Torrent * t )
    243243{
  • trunk/libtransmission/peer-msgs.c

    r9836 r9847  
    246246#endif
    247247
    248 static TR_INLINE tr_session*
     248static inline tr_session*
    249249getSession( struct tr_peermsgs * msgs )
    250250{
     
    308308}
    309309
    310 static TR_INLINE void
     310static inline void
    311311dbgOutMessageLen( tr_peermsgs * msgs )
    312312{
     
    15671567}
    15681568
    1569 static TR_INLINE void
     1569static inline void
    15701570decrementDownloadedCount( tr_peermsgs * msgs, uint32_t byteCount )
    15711571{
     
    15751575}
    15761576
    1577 static TR_INLINE void
     1577static inline void
    15781578clientGotUnwantedBlock( tr_peermsgs * msgs, const struct peer_request * req )
    15791579{
     
    21262126}
    21272127
    2128 static TR_INLINE void
     2128static inline void
    21292129pexDroppedCb( void * vpex,
    21302130              void * userData )
     
    21392139}
    21402140
    2141 static TR_INLINE void
     2141static inline void
    21422142pexElementCb( void * vpex,
    21432143              void * userData )
  • trunk/libtransmission/ratecontrol.h

    r7663 r9847  
    6464***/
    6565
    66 static TR_INLINE void tr_rcConstruct ( tr_ratecontrol * rc ) { memset( rc, 0, sizeof( tr_ratecontrol ) ); }
     66static inline void tr_rcConstruct ( tr_ratecontrol * rc ) { memset( rc, 0, sizeof( tr_ratecontrol ) ); }
    6767
    68 static TR_INLINE void tr_rcDestruct  ( tr_ratecontrol * rc ) { memset( rc, 0xDEAD, sizeof( tr_ratecontrol ) ); }
     68static inline void tr_rcDestruct  ( tr_ratecontrol * rc ) { memset( rc, 0xDEAD, sizeof( tr_ratecontrol ) ); }
    6969
    7070void             tr_rcTransferred ( tr_ratecontrol         * ratecontrol,
  • trunk/libtransmission/session.h

    r9671 r9847  
    170170};
    171171
    172 static TR_INLINE tr_bool tr_isSession( const tr_session * session )
     172static inline tr_bool tr_isSession( const tr_session * session )
    173173{
    174174    return ( session != NULL ) && ( session->magicNumber == SESSION_MAGIC_NUMBER );
    175175}
    176176
    177 static TR_INLINE tr_bool tr_isPreallocationMode( tr_preallocation_mode m  )
     177static inline tr_bool tr_isPreallocationMode( tr_preallocation_mode m  )
    178178{
    179179    return ( m == TR_PREALLOCATE_NONE )
     
    182182}
    183183
    184 static TR_INLINE tr_bool tr_isEncryptionMode( tr_encryption_mode m )
     184static inline tr_bool tr_isEncryptionMode( tr_encryption_mode m )
    185185{
    186186    return ( m == TR_CLEAR_PREFERRED )
     
    189189}
    190190
    191 static TR_INLINE tr_bool tr_isPriority( tr_priority_t p )
     191static inline tr_bool tr_isPriority( tr_priority_t p )
    192192{
    193193    return ( p == TR_PRI_LOW )
  • trunk/libtransmission/torrent.c

    r9842 r9847  
    814814}
    815815
    816 static TR_INLINE void
     816static inline void
    817817tr_torrentManualUpdateImpl( void * vtor )
    818818{
  • trunk/libtransmission/torrent.h

    r9817 r9847  
    255255
    256256/* get the index of this piece's first block */
    257 static TR_INLINE tr_block_index_t
     257static inline tr_block_index_t
    258258tr_torPieceFirstBlock( const tr_torrent * tor, const tr_piece_index_t piece )
    259259{
     
    262262
    263263/* what piece index is this block in? */
    264 static TR_INLINE tr_piece_index_t
     264static inline tr_piece_index_t
    265265tr_torBlockPiece( const tr_torrent * tor, const tr_block_index_t block )
    266266{
     
    269269
    270270/* how many blocks are in this piece? */
    271 static TR_INLINE uint32_t
     271static inline uint32_t
    272272tr_torPieceCountBlocks( const tr_torrent * tor, const tr_piece_index_t piece )
    273273{
     
    277277
    278278/* how many bytes are in this piece? */
    279 static TR_INLINE uint32_t
     279static inline uint32_t
    280280tr_torPieceCountBytes( const tr_torrent * tor, const tr_piece_index_t piece )
    281281{
     
    285285
    286286/* how many bytes are in this block? */
    287 static TR_INLINE uint32_t
     287static inline uint32_t
    288288tr_torBlockCountBytes( const tr_torrent * tor, const tr_block_index_t block )
    289289{
     
    292292}
    293293
    294 static TR_INLINE void tr_torrentLock( const tr_torrent * tor )
     294static inline void tr_torrentLock( const tr_torrent * tor )
    295295{
    296296    tr_globalLock( tor->session );
    297297}
    298298
    299 static TR_INLINE void tr_torrentUnlock( const tr_torrent * tor )
     299static inline void tr_torrentUnlock( const tr_torrent * tor )
    300300{
    301301    tr_globalUnlock( tor->session );
    302302}
    303303
    304 static TR_INLINE tr_bool
     304static inline tr_bool
    305305tr_torrentExists( const tr_session * session, const uint8_t *   torrentHash )
    306306{
     
    308308}
    309309
    310 static TR_INLINE tr_bool
     310static inline tr_bool
    311311tr_torrentIsSeed( const tr_torrent * tor )
    312312{
     
    314314}
    315315
    316 static TR_INLINE tr_bool tr_torrentIsPrivate( const tr_torrent * tor )
     316static inline tr_bool tr_torrentIsPrivate( const tr_torrent * tor )
    317317{
    318318    return ( tor != NULL ) && tor->info.isPrivate;
    319319}
    320320
    321 static TR_INLINE tr_bool tr_torrentAllowsPex( const tr_torrent * tor )
     321static inline tr_bool tr_torrentAllowsPex( const tr_torrent * tor )
    322322{
    323323    return ( tor != NULL )
     
    326326}
    327327
    328 static TR_INLINE tr_bool tr_torrentAllowsDHT( const tr_torrent * tor )
     328static inline tr_bool tr_torrentAllowsDHT( const tr_torrent * tor )
    329329{
    330330    return ( tor != NULL )
     
    333333}
    334334
    335 static TR_INLINE tr_bool tr_torrentIsPieceChecked( const tr_torrent  * tor,
     335static inline tr_bool tr_torrentIsPieceChecked( const tr_torrent  * tor,
    336336                                                   tr_piece_index_t    i )
    337337{
     
    348348};
    349349
    350 static TR_INLINE tr_bool tr_isTorrent( const tr_torrent * tor )
     350static inline tr_bool tr_isTorrent( const tr_torrent * tor )
    351351{
    352352    return ( tor != NULL )
     
    357357/* set a flag indicating that the torrent's .resume file
    358358 * needs to be saved when the torrent is closed */
    359 static TR_INLINE
     359static inline
    360360void tr_torrentSetDirty( tr_torrent * tor )
    361361{
     
    365365}
    366366
    367 static TR_INLINE
     367static inline
    368368const char * tr_torrentName( const tr_torrent * tor )
    369369{
  • trunk/libtransmission/utils.c

    r9833 r9847  
    5555#ifndef WIN32
    5656    /* make null versions of these win32 functions */
    57     static TR_INLINE int IsDebuggerPresent( void ) { return FALSE; }
    58     static TR_INLINE void OutputDebugString( const void * unused UNUSED ) { }
     57    static inline int IsDebuggerPresent( void ) { return FALSE; }
     58    static inline void OutputDebugString( const void * unused UNUSED ) { }
    5959#endif
    6060
Note: See TracChangeset for help on using the changeset viewer.