mirror of
https://github.com/transmission/transmission
synced 2025-03-12 15:14:12 +00:00
(trunk libT) make tr_msgLoggingIsActive() an inlined function. suggested by BentMyWookie
This commit is contained in:
parent
1936988cdc
commit
c7f061cafc
3 changed files with 12 additions and 12 deletions
|
@ -593,6 +593,8 @@ tr_sessionInit( const char * tag,
|
|||
tr_session * session;
|
||||
struct init_data data;
|
||||
|
||||
tr_msgInit( );
|
||||
|
||||
assert( tr_bencIsDict( clientSettings ) );
|
||||
|
||||
/* initialize the bare skeleton of the session object */
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
#include "version.h"
|
||||
|
||||
|
||||
int messageLevel = 0;
|
||||
static tr_lock * messageLock = NULL;
|
||||
static int messageLevel = 0;
|
||||
static tr_bool messageQueuing = FALSE;
|
||||
static tr_msg_list * messageQueue = NULL;
|
||||
static tr_msg_list ** messageQueueTail = &messageQueue;
|
||||
|
@ -73,8 +73,7 @@ tr_timeUpdate( time_t now )
|
|||
****
|
||||
***/
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
tr_msgInit( void )
|
||||
{
|
||||
static tr_bool initialized = FALSE;
|
||||
|
@ -301,14 +300,6 @@ tr_deepLog( const char * file,
|
|||
****
|
||||
***/
|
||||
|
||||
int
|
||||
tr_msgLoggingIsActive( int level )
|
||||
{
|
||||
tr_msgInit( );
|
||||
|
||||
return messageLevel >= level;
|
||||
}
|
||||
|
||||
void
|
||||
tr_msg( const char * file, int line,
|
||||
int level, const char * name,
|
||||
|
|
|
@ -123,7 +123,14 @@ void tr_assertImpl( const char * file, int line, const char * test, const char *
|
|||
do { if( ! ( test ) ) tr_assertImpl( __FILE__, __LINE__, #test, fmt, __VA_ARGS__ ); } while( 0 )
|
||||
#endif
|
||||
|
||||
int tr_msgLoggingIsActive( int level );
|
||||
void tr_msgInit( void );
|
||||
|
||||
extern int messageLevel;
|
||||
|
||||
static TR_INLINE tr_bool tr_msgLoggingIsActive( int level )
|
||||
{
|
||||
return messageLevel >= level;
|
||||
}
|
||||
|
||||
void tr_msg( const char * file,
|
||||
int line,
|
||||
|
|
Loading…
Add table
Reference in a new issue