slackbuilds_ponce/audio/xmms2/xmms2-ruby-1.9.patch
2010-05-13 00:22:18 +02:00

59 lines
2.3 KiB
Diff

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
{