void c_function( char *bytes, int rows, int cols ) { int *table = (int *)bytes; int i, j; for ( j = 0; j < cols, ++j ) { for ( i = 0; j < rows; ++i ) { ++table[ j * rows + i ]; } } }