summaryrefslogtreecommitdiff
path: root/multimedia/ruby-ming/patches/patch-ac
blob: 6cff09f1acb9197f7af57b4f4470d8b7b2e39e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-ac,v 1.1 2010/09/10 07:31:45 taca Exp $

Use modern Ruby API.

--- ext/ming/mingc/swffiltermatrix.c.orig	2008-03-09 20:12:44.000000000 +0000
+++ ext/ming/mingc/swffiltermatrix.c
@@ -43,9 +43,9 @@ rb_SWFFilterMatrix_new(self, cols, rows,
   struct RSWFFilterMatrix *fm = ALLOC(struct RSWFFilterMatrix);
   int i;
 
-  int size = RARRAY(vals)->len;
+  int size = RARRAY_LEN(vals);
   float *tab = (float *)malloc(cols*rows*sizeof(float));
-  VALUE *ptr = RARRAY(vals)->ptr;
+  VALUE *ptr = RARRAY_PTR(vals);
 
   for (i=0;i<size;i++,ptr++) {