Changeset 9604


Ignore:
Timestamp:
Nov 27, 2009, 3:25:14 PM (12 years ago)
Author:
charles
Message:

(trunk libT) make tr_msgLoggingIsActive() an inlined function. suggested by BentMyWookie?

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/session.c

    r9594 r9604  
    594594    struct init_data data;
    595595
     596    tr_msgInit( );
     597
    596598    assert( tr_bencIsDict( clientSettings ) );
    597599
  • trunk/libtransmission/utils.c

    r9593 r9604  
    4646
    4747
     48int                   messageLevel = 0;
    4849static tr_lock *      messageLock = NULL;
    49 static int            messageLevel = 0;
    5050static tr_bool        messageQueuing = FALSE;
    5151static tr_msg_list *  messageQueue = NULL;
     
    7474***/
    7575
    76 
    77 static void
     76void
    7877tr_msgInit( void )
    7978{
     
    301300****
    302301***/
    303 
    304 int
    305 tr_msgLoggingIsActive( int level )
    306 {
    307     tr_msgInit( );
    308 
    309     return messageLevel >= level;
    310 }
    311302
    312303void
  • trunk/libtransmission/utils.h

    r9593 r9604  
    124124#endif
    125125
    126 int            tr_msgLoggingIsActive( int level );
     126void tr_msgInit( void );
     127
     128extern int messageLevel;
     129
     130static TR_INLINE tr_bool tr_msgLoggingIsActive( int level )
     131{
     132    return messageLevel >= level;
     133}
    127134
    128135void           tr_msg( const char * file,
Note: See TracChangeset for help on using the changeset viewer.