At Julian's request, I went ahead and pushed my implementation of
`scm_c_value_ref' to the stable-2.0 branch, so it will be in 2.0.4.
Thanks,
Mark
I think something along these lines be ideal,
though this code is UNTESTED.
Mark
SCM
scm_c_value_ref (SCM obj, size_t idx)
{
if (SCM_VALUESP (obj))
{
SCM values = scm_struct_ref (obj, SCM_INUM0);
size_t i = idx;
while (SCM_LIKELY (!scm_is_null (values)))
{
Hi!
Mark H Weaver skribis:
> l...@gnu.org (Ludovic Courtès) writes:
>
>> Mark H Weaver skribis:
>>
>>> Julian Graham 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 (i
l...@gnu.org (Ludovic Courtès) writes:
> Mark H Weaver skribis:
>
>> Julian Graham 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 veri
Hi all,
Thanks for the review!
On Wed, Jan 18, 2012 at 3:19 PM, Ludovic Courtès wrote:
> Julian: could you change these bits and send an updated patch?
Will do.
Regards,
Julian
Hi Mark,
Mark H Weaver skribis:
> Julian Graham 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?
>
> Shoul
On Wed 18 Jan 2012 04:15, Mark H Weaver writes:
> Should this verify that `obj' is a values object?
>
> Should it verify that `idx' can fit in an inum?
Agreed!
> Also, if `obj' is _not_ a values object and `idx' is 0, should this
> simply return `obj'? Since a single value is conceptually no d
Hi Julian, thanks for working on this!
Julian Graham 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 verif
On Sun 15 Jan 2012 22:47, l...@gnu.org (Ludovic Courtès) writes:
Not yet. You interested in adding scm_c_value_ref (SCM, size_t) to the
API, and documentation to api-control.texi? If you do it soon, it
will make it into 2.0.4.
>>>
>>> Sure. Gimme a day or so and I'll have somethi
Hi Julian,
Julian Graham skribis:
>>> Not yet. You interested in adding scm_c_value_ref (SCM, size_t) to the
>>> API, and documentation to api-control.texi? If you do it soon, it
>>> will make it into 2.0.4.
>>
>> Sure. Gimme a day or so and I'll have something for review.
>
> Find attached a
Howdy,
>> Not yet. You interested in adding scm_c_value_ref (SCM, size_t) to the
>> API, and documentation to api-control.texi? If you do it soon, it
>> will make it into 2.0.4.
>
> Sure. Gimme a day or so and I'll have something for review.
Find attached a patch. Let me know if I missed any
Hey Andy,
> Not yet. You interested in adding scm_c_value_ref (SCM, size_t) to the
> API, and documentation to api-control.texi? If you do it soon, it
> will make it into 2.0.4.
Sure. Gimme a day or so and I'll have something for review.
Regards,
Julian
Hi,
On Tue 01 Nov 2011 16:34, Julian Graham writes:
> I was playing around with some C code that uses the new R6RS
> bytevector ports, and I noticed that there doesn't seem to be an easy
> way (a la `let-values' or `receive') to access multiple return values
> from C. I've resorted to doing:
>
Hi,
Julian Graham skribis:
> I was playing around with some C code that uses the new R6RS
> bytevector ports, and I noticed that there doesn't seem to be an easy
> way (a la `let-values' or `receive') to access multiple return values
> from C. I've resorted to doing:
>
> scm_struct_ref (foo,
Hey all,
I was playing around with some C code that uses the new R6RS
bytevector ports, and I noticed that there doesn't seem to be an easy
way (a la `let-values' or `receive') to access multiple return values
from C. I've resorted to doing:
scm_struct_ref (foo, SCM_INUM0);
...which is almost
15 matches
Mail list logo