lua-users home
lua-l archive

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


Hello,

Given a C function that returns a pointer to an array
of values, what sort of trickery is needed to get at
the elements of that array from within lua?

A simple example function recieves a single integer
argument and returns a pointer to an array and a pointer
to the length of the array:

  int get_float_array( int arg,
                       float** ret_array,
                       int* ret_array_length );

Solutions, workarounds, and/or hints appreciated!