Skip to content

Instantly share code, notes, and snippets.

@steve-s
Created July 21, 2022 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steve-s/bb4838b4e0dba0a015765b9d1c5e2aea to your computer and use it in GitHub Desktop.
Save steve-s/bb4838b4e0dba0a015765b9d1c5e2aea to your computer and use it in GitHub Desktop.
template<> inline
HPy BinaryAdd::operator()( HPyContext *ctx, Variable* first, double second, HPy h_first, HPy h_second )
{
HPy temp = BinaryMul()( ctx, first, 1.0, h_first, HPy_NULL );
if( HPy_IsNull(temp) )
return HPy_NULL;
return operator()( ctx, Term_AsStruct( ctx, temp ), second, temp, h_second );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment