summaryrefslogtreecommitdiff
path: root/community/xmms2/xmms2-ruby-1.9.patch
blob: 6316ace61ffea2b245aa0af042de12414e04c429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff -wbBur xmms2-0.6DrMattDestruction/src/clients/lib/ruby/rb_collection.c xmms2-0.6DrMattDestruction.my/src/clients/lib/ruby/rb_collection.c
--- xmms2-0.6DrMattDestruction/src/clients/lib/ruby/rb_collection.c	2009-04-21 17:51:11.000000000 +0000
+++ xmms2-0.6DrMattDestruction.my/src/clients/lib/ruby/rb_collection.c	2009-09-14 09:13:19.000000000 +0000
@@ -241,10 +241,10 @@
 	COLL_METHOD_HANDLER_HEADER
 
 	rb_ary = RARRAY (ids);
-	ary = malloc (sizeof (unsigned int *) * (rb_ary->len + 1));
+	ary = malloc (sizeof (unsigned int *) * (RARRAYLEN(rb_ary) + 1));
 
-	for (i = 0; i < rb_ary->len; i++)
-		ary[i] = NUM2UINT (rb_ary->ptr[i]);
+	for (i = 0; i < RARRAYLEN(rb_ary); i++)
+		ary[i] = NUM2UINT (RARRAY_PTR(rb_ary)[i]);
 
 	ary[i] = 0;
 
diff -wbBur xmms2-0.6DrMattDestruction/src/clients/lib/ruby/rb_xmmsclient.c xmms2-0.6DrMattDestruction.my/src/clients/lib/ruby/rb_xmmsclient.c
--- xmms2-0.6DrMattDestruction/src/clients/lib/ruby/rb_xmmsclient.c	2009-04-21 17:51:11.000000000 +0000
+++ xmms2-0.6DrMattDestruction.my/src/clients/lib/ruby/rb_xmmsclient.c	2009-09-14 09:14:51.000000000 +0000
@@ -1421,10 +1421,10 @@
 	if (!NIL_P (rb_check_array_type (value))) {
 		struct RArray *ary = RARRAY (value);
 
-		ret = malloc (sizeof (char *) * (ary->len + 1));
+		ret = malloc (sizeof (char *) * (RARRAYLEN(ary) + 1));
 
-		for (i = 0; i < ary->len; i++)
-			ret[i] = StringValuePtr (ary->ptr[i]);
+		for (i = 0; i < RARRAYLEN(ary); i++)
+			ret[i] = StringValuePtr (RARRAY_PTR(ary)[i]);
 
 		ret[i] = NULL;
 	} else {
@@ -1451,10 +1451,10 @@
 		struct RArray *ary = RARRAY (value);
 		int i;
 
-		for (i = 0; i < ary->len; i++) {
+		for (i = 0; i < RARRAYLEN(ary); i++) {
 			xmmsv_t *elem;
 
-			elem = xmmsv_new_string (StringValuePtr (ary->ptr[i]));
+			elem = xmmsv_new_string (StringValuePtr (RARRAY_PTR(ary)[i]));
 			xmmsv_list_append (list, elem);
 			xmmsv_unref (elem);
 		}
diff -wbBur xmms2-0.6DrMattDestruction/src/include/xmmsclient/xmmsclient++/helpers.h xmms2-0.6DrMattDestruction.my/src/include/xmmsclient/xmmsclient++/helpers.h
--- xmms2-0.6DrMattDestruction/src/include/xmmsclient/xmmsclient++/helpers.h	2009-04-21 17:51:11.000000000 +0000
+++ xmms2-0.6DrMattDestruction.my/src/include/xmmsclient/xmmsclient++/helpers.h	2009-09-14 09:00:11.000000000 +0000
@@ -33,6 +33,8 @@
 #include <list>
 #include <vector>
 
+#include <linux/limits.h>
+
 namespace Xmms
 {