Fixed a build failure

Added a thread assertion to function.cpp
This commit is contained in:
ridiculousfish 2011-12-26 21:56:23 -08:00
parent 28ecc68841
commit 0d8bb78f66
2 changed files with 6 additions and 5 deletions

View File

@ -646,7 +646,7 @@ int main( int argc, char ** argv )
FD_SET( c->fd, &read_fd );
max_fd = maxi( max_fd, c->fd+1);
if( ! q_empty( &c->unsent ) )
if( ! c->unsent->empty() )
{
FD_SET( c->fd, &write_fd );
}
@ -738,7 +738,7 @@ int main( int argc, char ** argv )
{
debug( 4, L"Close connection %d", c->fd );
while( ! c->unsent->empty()) )
while( ! c->unsent->empty() )
{
message_t *msg = c->unsent->front();
c->unsent->pop();

View File

@ -123,6 +123,7 @@ static int is_autoload = 0;
*/
static int load( const wchar_t *name )
{
ASSERT_IS_MAIN_THREAD();
int was_autoload = is_autoload;
int res;
function_internal_data_t *data;
@ -263,7 +264,7 @@ void function_add( function_data_t *data )
UNLOCK_FUNCTIONS();
}
static int function_exists_internal( const wchar_t *cmd, int autoload )
static int function_exists_internal( const wchar_t *cmd, bool autoload )
{
int res;
CHECK( cmd, 0 );
@ -280,12 +281,12 @@ static int function_exists_internal( const wchar_t *cmd, int autoload )
int function_exists( const wchar_t *cmd )
{
return function_exists_internal( cmd, 1 );
return function_exists_internal( cmd, true );
}
int function_exists_no_autoload( const wchar_t *cmd )
{
return function_exists_internal( cmd, 0 );
return function_exists_internal( cmd, false );
}
void function_remove( const wchar_t *name )