aboutsummaryrefslogtreecommitdiffhomepage
path: root/function.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2011-12-26 21:56:23 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2011-12-26 21:56:23 -0800
commit0d8bb78f66292a7359797de86bbe0e2ff533f460 (patch)
treed8dbdb4e1f8c8b4790ad0b877653ff827e3db4d3 /function.cpp
parent28ecc68841b233188754dd2603566ddf04c288c3 (diff)
Fixed a build failure
Added a thread assertion to function.cpp
Diffstat (limited to 'function.cpp')
-rw-r--r--function.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/function.cpp b/function.cpp
index 52fc333d..760d05f4 100644
--- a/function.cpp
+++ b/function.cpp
@@ -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 )