Hi Mark,

Mark H Weaver <m...@netris.org> skribis:

> Julian Graham <jool...@gmail.com> writes:
>> +SCM
>> +scm_c_value_ref (SCM obj, size_t idx)
>> +{
>> +  SCM values = scm_struct_ref (obj, SCM_INUM0);
>> +  return scm_list_ref (values, SCM_I_MAKINUM (idx));
>> +}
>> +
>
> Should this verify that `obj' is a values object?
>
> Should it verify that `idx' can fit in an inum?

Yes, good point.  Using an ‘SCM_VALIDATE’, which will throw an exception
upon error, right?

> Also, if `obj' is _not_ a values object and `idx' is 0, should this
> simply return `obj'?

Yes, makes sense to me.

Julian: could you change these bits and send an updated patch?

Thanks,
Ludo’.

Reply via email to