Hi,

John Steele Scott <[EMAIL PROTECTED]> writes:

>> Now, I'd rather use a Scheme vector to represent a C vector so that it
>> wouldn't need to be traversed at "marshalling"-time.
>
> Yes, I notice a deprecated gh_scm2doubles (SCM VECTOR, double *RESULT) in
> the manual, that would have made this much simpler.
>
> Do you know the purpose of the second argument to scm_num2dbl (called
> "why")? I notice that guile 1.8 has a scm_to_double which does not have
> this second argument, but I'm stuck with 1.6 for the time being.

No, I'm not familiar with the API in 1.6.

My point was: if you use a list, then you have to traverse it in order
to produce the C array.  In 1.8, there are SRFI-4 arrays which you can
directly access using a regular C pointer, which is certainly what you'd
want here.

Now, SRFI-4 isn't available in 1.6 IIRC.  So you could use regular
Scheme vectors instead, but then you'd have to convert every element of
the array...

Hope this helps,
Ludovic.


_______________________________________________
g-wrap-dev mailing list
g-wrap-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/g-wrap-dev

Reply via email to