Skip to content

Commit

Permalink
Add EM bindings for Oa_Simplify in EMSCRIPTEN context.
Browse files Browse the repository at this point in the history
This change includes Oa_Simplify binding only when compiled with EMSCRIPTEN. The condition ensures unnecessary bindings are excluded in other environments, optimizing code maintenance and execution.
  • Loading branch information
matthew-mccall committed Aug 29, 2024
1 parent 7517168 commit 9fb7183
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ EMSCRIPTEN_KEEPALIVE void Oa_Free(Oa_Expression* cexpr)
delete exp;
}

#ifdef __EMSCRIPTEN__
EMSCRIPTEN_BINDINGS(core)
{
function("Oa_Simplify", &Oa_Simplify, emscripten::return_value_policy::reference());
}
#endif

}

0 comments on commit 9fb7183

Please sign in to comment.