Ffi and array

how can I call this C function:

int** add_arr(int** array1, int** array2, int nrows, int ncols) {
  int i, j;
  int** res;
  res = allocate2D(nrows, ncols);
  for(i = 0; i < nrows; i++) {
    for(j = 0; j < ncols; j++) {
      res[i][j] =  array1[i][j] +  array2[i][j];
  return res;

with Ruby-ffi?

Best regards

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs