Aha.

How can I know based on the return value of some random Gambit C function like ___aloc_scmobj or ___U32_to_SCMOBJ that it guaranteedly will trig an exception when returning to the Scheme world, without me needing to take any futher action for that to happen - will that happen in all non-___FIX(___NO_ERR) result cases?


2016-01-07 5:37 GMT+08:00 Marc Feeley <feeley@iro.umontreal.ca>:
Actually, all c-lambdas that can generate an exception will check the variable ___err to see if there was an error.

The implementation is the macro ___CFUN_CONV_ERROR in gambit.h .

Marc

> On Jan 6, 2016, at 4:32 PM, Adam <adam.mlmb@gmail.com> wrote:
>
> Aha interesting, so every c-lambda that returns a scheme-object, will check if ___result is set to an error.  Does that check trig on all errors, what's its definition.., is it implemented in any particular macro or alike?
>
> Just for me as a user to be able to know exactly.