mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
Fixed a build failure
Added a thread assertion to function.cpp
This commit is contained in:
parent
28ecc68841
commit
0d8bb78f66
2 changed files with 6 additions and 5 deletions
|
@ -646,7 +646,7 @@ int main( int argc, char ** argv )
|
||||||
FD_SET( c->fd, &read_fd );
|
FD_SET( c->fd, &read_fd );
|
||||||
max_fd = maxi( max_fd, c->fd+1);
|
max_fd = maxi( max_fd, c->fd+1);
|
||||||
|
|
||||||
if( ! q_empty( &c->unsent ) )
|
if( ! c->unsent->empty() )
|
||||||
{
|
{
|
||||||
FD_SET( c->fd, &write_fd );
|
FD_SET( c->fd, &write_fd );
|
||||||
}
|
}
|
||||||
|
@ -738,7 +738,7 @@ int main( int argc, char ** argv )
|
||||||
{
|
{
|
||||||
debug( 4, L"Close connection %d", c->fd );
|
debug( 4, L"Close connection %d", c->fd );
|
||||||
|
|
||||||
while( ! c->unsent->empty()) )
|
while( ! c->unsent->empty() )
|
||||||
{
|
{
|
||||||
message_t *msg = c->unsent->front();
|
message_t *msg = c->unsent->front();
|
||||||
c->unsent->pop();
|
c->unsent->pop();
|
||||||
|
|
|
@ -123,6 +123,7 @@ static int is_autoload = 0;
|
||||||
*/
|
*/
|
||||||
static int load( const wchar_t *name )
|
static int load( const wchar_t *name )
|
||||||
{
|
{
|
||||||
|
ASSERT_IS_MAIN_THREAD();
|
||||||
int was_autoload = is_autoload;
|
int was_autoload = is_autoload;
|
||||||
int res;
|
int res;
|
||||||
function_internal_data_t *data;
|
function_internal_data_t *data;
|
||||||
|
@ -263,7 +264,7 @@ void function_add( function_data_t *data )
|
||||||
UNLOCK_FUNCTIONS();
|
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;
|
int res;
|
||||||
CHECK( cmd, 0 );
|
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 )
|
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 )
|
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 )
|
void function_remove( const wchar_t *name )
|
||||||
|
|
Loading…
Reference in a new issue