]>
Commit | Line | Data |
---|---|---|
3a1c24aa JB |
1 | --- xmms2-0.5DrLecter/src/clients/lib/ruby/wscript.orig 2023-05-21 14:20:34.466607748 +0200 |
2 | +++ xmms2-0.5DrLecter/src/clients/lib/ruby/wscript 2023-05-21 14:57:59.467778866 +0200 | |
3 | @@ -56,25 +56,25 @@ def configure(conf): | |
4 | conf.check_message('ruby version', '> 1.8', True, version_str) | |
5 | ||
6 | if version == [1, 8]: # Ruby 1.8 | |
7 | - ruby_h = os.popen(ruby + " -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").read().strip() | |
8 | + ruby_h = os.popen(ruby + " -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"archdir\"] + \"/ruby.h\")'").read().strip() | |
9 | else: # Ruby 1.9 | |
10 | - ruby_h = os.popen(ruby + " -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").read().strip() | |
11 | + ruby_h = os.popen(ruby + " -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").read().strip() | |
0841a5c2 JB |
12 | if ruby_h != 'true': |
13 | conf.check_message('ruby', 'header file', False) | |
14 | return False | |
15 | conf.check_message('ruby', 'header file', True) | |
16 | ||
17 | - dir = os.popen(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'").read().strip() | |
3a1c24aa JB |
18 | + dir = os.popen(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(RbConfig::CONFIG[\"archdir\"], 0..1)'").read().strip() |
19 | conf.env["CPPPATH_ruby"] = [dir] | |
0841a5c2 JB |
20 | conf.env["LINKFLAGS_ruby"] = '-L%s' % dir |
21 | ||
3a1c24aa JB |
22 | - if version == [1, 9]: # Ruby 1.9 |
23 | - hdir = os.popen(ruby + " -rrbconfig -e 'puts Config::CONFIG[\"rubyhdrdir\"]'").read().strip() | |
24 | + if version >= [1, 9]: # Ruby 1.9 | |
25 | + hdir = os.popen(ruby + " -rrbconfig -e 'puts RbConfig::CONFIG[\"rubyhdrdir\"]'").read().strip() | |
26 | conf.env["CPPPATH_ruby"] += [hdir, os.path.join(hdir, "ruby")] | |
27 | - hdir = os.popen(ruby + " -rrbconfig -e 'puts File.join(Config::CONFIG[\"rubyhdrdir\"], Config::CONFIG[\"arch\"])'").read().strip() | |
28 | + hdir = os.popen(ruby + " -rrbconfig -e 'puts File.join(RbConfig::CONFIG[\"rubyhdrdir\"], RbConfig::CONFIG[\"arch\"])'").read().strip() | |
29 | conf.env["CPPPATH_ruby"] += [hdir] | |
30 | ||
31 | - lib = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"RUBY_SO_NAME\"]'").read().strip() | |
32 | + lib = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"RUBY_SO_NAME\"]'").read().strip() | |
33 | ||
34 | # Check for rb_protect_inspect for our inspect methods. | |
35 | test = conf.create(enumerator='function') | |
36 | @@ -86,7 +86,7 @@ def configure(conf): | |
37 | if test.run(): | |
38 | conf.env['CCDEFINES_ruby'] = ['HAVE_PROTECT_INSPECT'] | |
39 | ||
ceaebfc7 JB |
40 | - ldflags = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"LDSHARED\"]'").read().strip() |
41 | + ldflags = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"LDSHARED\"]'").read().strip() | |
42 | # ok this is really stupid, but the command and flags are combined. | |
43 | # so we try to find the first argument... | |
44 | flags = ldflags.split() | |
3a1c24aa | 45 | @@ -94,21 +94,21 @@ def configure(conf): |
ceaebfc7 JB |
46 | flags = flags[1:] |
47 | conf.env["LINKFLAGS_ruby"] += " "+" ".join(flags) | |
48 | ||
49 | - ldflags = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"LIBS\"]'").read().strip() | |
50 | + ldflags = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"LIBS\"]'").read().strip() | |
51 | conf.env["LINKFLAGS_ruby"] += " "+ldflags | |
52 | - ldflags = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"LIBRUBYARG_SHARED\"]'").read().strip() | |
53 | + ldflags = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"LIBRUBYARG_SHARED\"]'").read().strip() | |
54 | conf.env["LINKFLAGS_ruby"] += " "+ldflags | |
55 | ||
56 | - cflags = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"CCDLFLAGS\"]'").read().strip() | |
57 | + cflags = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"CCDLFLAGS\"]'").read().strip() | |
58 | conf.env["CCFLAGS_ruby"] = cflags | |
59 | ||
0841a5c2 JB |
60 | if not Params.g_options.rubyarchdir: |
61 | - conf.env["ARCHDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'").read().strip() | |
3a1c24aa | 62 | + conf.env["ARCHDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"sitearchdir\"]'").read().strip() |
0841a5c2 JB |
63 | else: |
64 | conf.env["ARCHDIR_ruby"] = Params.g_options.rubyarchdir | |
65 | ||
66 | if not Params.g_options.rubylibdir: | |
67 | - conf.env["LIBDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitelibdir\"]'").read().strip() | |
3a1c24aa | 68 | + conf.env["LIBDIR_ruby"] = os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"sitelibdir\"]'").read().strip() |
0841a5c2 JB |
69 | else: |
70 | conf.env["LIBDIR_ruby"] = Params.g_options.rubylibdir | |
71 | ||
3a1c24aa JB |
72 | @@ -123,7 +123,7 @@ def configure(conf): |
73 | + 'ruby bindings to be installed to ' + conf.env['LIBDIR_ruby']) | |
74 | ||
ceaebfc7 JB |
75 | conf.env["rubyext_PREFIX"] = '' |
76 | - conf.env["rubyext_SUFFIX"] = '.' + os.popen(ruby + " -rrbconfig -e 'print Config::CONFIG[\"DLEXT\"]'").read().strip() | |
77 | + conf.env["rubyext_SUFFIX"] = '.' + os.popen(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"DLEXT\"]'").read().strip() | |
78 | conf.env["rubyext_USELIB"] = "ruby" | |
79 | conf.env["rubyext_obj_ext"] = conf.env["shlib_obj_ext"] | |
80 | ||
0841a5c2 JB |
81 | --- xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_xmmsclient.c.orig 2023-05-14 19:24:29.670968613 +0200 |
82 | +++ xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_xmmsclient.c 2023-05-14 19:29:16.606080819 +0200 | |
0841a5c2 JB |
83 | @@ -1371,10 +1371,10 @@ parse_string_array (VALUE value) |
84 | if (!NIL_P (rb_check_array_type (value))) { | |
85 | struct RArray *ary = RARRAY (value); | |
86 | ||
87 | - ret = malloc (sizeof (char *) * (ary->len + 1)); | |
88 | + ret = malloc (sizeof (char *) * (RARRAY_LEN(ary) + 1)); | |
89 | ||
90 | - for (i = 0; i < ary->len; i++) | |
91 | - ret[i] = StringValuePtr (ary->ptr[i]); | |
92 | + for (i = 0; i < RARRAY_LEN(ary); i++) | |
93 | + ret[i] = StringValuePtr (RARRAY_PTR(ary)[i]); | |
94 | ||
95 | ret[i] = NULL; | |
96 | } else { | |
0841a5c2 JB |
97 | --- xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_playlist.c.orig 2007-05-20 17:55:40.000000000 +0200 |
98 | +++ xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_playlist.c 2023-05-18 20:59:44.461066374 +0200 | |
99 | @@ -301,10 +301,10 @@ c_sort (VALUE self, VALUE props) | |
100 | if (!NIL_P (props = rb_check_array_type (props))) { | |
101 | ary = RARRAY (props); | |
102 | ||
103 | - cprops = malloc (sizeof (char *) * (ary->len + 1)); | |
104 | + cprops = malloc (sizeof (char *) * (RARRAY_LEN(ary) + 1)); | |
105 | ||
106 | - for (i = 0; i < ary->len; i++) | |
107 | - cprops[i] = StringValuePtr (ary->ptr[i]); | |
108 | + for (i = 0; i < RARRAY_LEN(ary); i++) | |
109 | + cprops[i] = StringValuePtr (RARRAY_PTR(ary)[i]); | |
110 | ||
111 | cprops[i] = NULL; | |
112 | } else if (!NIL_P (rb_check_string_type (props))) { | |
3a1c24aa JB |
113 | --- xmms2-0.5DrLecter/src/clients/lib/ruby/rb_collection.c.orig 2008-06-15 19:31:38.000000000 +0200 |
114 | +++ xmms2-0.5DrLecter/src/clients/lib/ruby/rb_collection.c 2023-05-21 15:05:06.452132360 +0200 | |
115 | @@ -241,10 +241,10 @@ c_coll_idlist_set (VALUE self, VALUE ids | |
0841a5c2 JB |
116 | COLL_METHOD_HANDLER_HEADER |
117 | ||
118 | rb_ary = RARRAY (ids); | |
119 | - ary = malloc (sizeof (unsigned int *) * (rb_ary->len + 1)); | |
120 | + ary = malloc (sizeof (unsigned int *) * (RARRAY_LEN(rb_ary) + 1)); | |
121 | ||
122 | - for (i = 0; i < rb_ary->len; i++) | |
123 | - ary[i] = NUM2UINT (rb_ary->ptr[i]); | |
124 | + for (i = 0; i < RARRAY_LEN(rb_ary); i++) | |
125 | + ary[i] = NUM2UINT (RARRAY_PTR(rb_ary)[i]); | |
126 | ||
127 | ary[i] = 0; | |
128 | ||
3a1c24aa | 129 | @@ -285,8 +285,8 @@ attrs_inspect_cb (VALUE args, VALUE s) |
0841a5c2 JB |
130 | { |
131 | VALUE key, value; | |
132 | ||
133 | - key = RARRAY (args)->ptr[0]; | |
134 | - value = RARRAY (args)->ptr[1]; | |
3a1c24aa JB |
135 | + key = RARRAY_PTR (args)[0]; |
136 | + value = RARRAY_PTR (args)[1]; | |
0841a5c2 | 137 | |
3a1c24aa | 138 | if (RSTRING_LEN (s) > 1) |
0841a5c2 | 139 | rb_str_buf_cat2 (s, ", "); |