Skip to content

Commit

Permalink
add ChucK::bind() api
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Jan 7, 2025
1 parent d5c4e7b commit 32e7693
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/core/chuck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,28 @@ void ChucK::poop()



//-----------------------------------------------------------------------------
// name: bind()
// desc: additional native chuck bindings/types (use with extra caution)
//-----------------------------------------------------------------------------
t_CKBOOL ChucK::bind( f_ck_query queryFunc, const std::string & name )
{
// check if we have initialized a compiler
if( !compiler() )
{
// error message
EM_error2( 0, "cannot bind() -- ChucK/compiler is not initialized..." );
// done
return FALSE;
}

// perform the bind
return compiler()->bind( queryFunc, name );
}




//-----------------------------------------------------------------------------
// name: setMainThreadHook()
// desc: set a function pointer to call from the main thread loop
Expand Down

0 comments on commit 32e7693

Please sign in to comment.