42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
diff -aur mb-ruby-0.3.0.orig/musicbrainz.c mb-ruby-0.3.0/musicbrainz.c
|
|
--- mb-ruby-0.3.0.orig/musicbrainz.c 2006-08-29 01:47:03.000000000 +0200
|
|
+++ mb-ruby-0.3.0/musicbrainz.c 2009-10-26 19:33:21.397764820 +0100
|
|
@@ -462,7 +462,7 @@
|
|
break;
|
|
default:
|
|
/* grab object */
|
|
- obj = RSTRING(argv[0])->ptr;
|
|
+ obj = RSTRING_PTR(argv[0]);
|
|
|
|
/* allocate argument list */
|
|
if ((args = malloc(sizeof(char*) * argc)) == NULL)
|
|
@@ -470,7 +470,7 @@
|
|
|
|
/* add each argument list, then terminate the list */
|
|
for (i = 1; i < argc; i++)
|
|
- args[i - 1] = RSTRING(argv[i])->ptr;
|
|
+ args[i - 1] = RSTRING_PTR(argv[i]);
|
|
args[argc - 1] = NULL;
|
|
|
|
/* execute query and free argument list */
|
|
@@ -1128,8 +1128,8 @@
|
|
int len;
|
|
|
|
Data_Get_Struct(self, trm_t, trm);
|
|
- ptr = RSTRING(buf)->ptr;
|
|
- len = RSTRING(buf)->len;
|
|
+ ptr = RSTRING_PTR(buf);
|
|
+ len = RSTRING_LEN(buf);
|
|
|
|
return trm_GenerateSignature(*trm, ptr, len) ? Qtrue : Qfalse;
|
|
}
|
|
@@ -1159,7 +1159,7 @@
|
|
break;
|
|
case 1:
|
|
if (argv[0] != Qnil)
|
|
- id = RSTRING(argv[0])->ptr;
|
|
+ id = RSTRING_PTR(argv[0]);
|
|
break;
|
|
default:
|
|
rb_raise(eErr, "Invalid argument count: %d.", argc);
|