lua-users home
lua-l archive

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


> But you can change the declaration. The structs are compatible in
> here. Simply declare the 'wrong' return type on the Lua side.


Thank you Mike, I've adopted your suggestion. You can just typedef
gsl_matrix_view as a gsl_matrix and everything works just fine. It is
funny to note that you can use the same trick in C applications and it
will work just as finely as with Lua :-)

Probably the distinction between matrix and view is done in GSL just
to enforce the clarity and readability in the code but I'm not
entirely sure that it is actually a good idea.

-- 
Francesco