lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2011/3/17 Mike Pall <mikelu-1103@mike.de>:
> Francesco Abbate wrote:
>> Mike, could you confirm my analysis of the problem ?
>
> Looks correct.
>
>> Could you suggest
>> a better solution to what I've found or may be give some general
>> recommendations ?

Thank you Mike. Unfortunately I cannot change the returned values of
the function because this is a standard GSL function.

I confess I've never understood why they returns a matrix_view instead
of a matrix since the two structures are ultimately identical. In C
code this is not a problem because you always write something like:

gsl_matrix_view v = (a gsl function that return a view).
gsl_matrix_do_something (&v.matrix);

The only problem is that with Lua and FFI this force you to create two
distinct cdata objects.

Thank you very much for having take the time of looking at my problem :-)

-- 
Francesco