Forum: JRuby ffi and array

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fla A. (Guest)
on 2008-11-15 11:55
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 topic is locked and can not be replied to.