summaryrefslogtreecommitdiff
path: root/ruby-musicbrainz/ruby-musicbrainz.diff
blob: 9ae02bacdc5a99d0b716672cbac3ae46be32f801 (plain)
    1 diff -aur mb-ruby-0.3.0.orig/musicbrainz.c mb-ruby-0.3.0/musicbrainz.c
    2 --- mb-ruby-0.3.0.orig/musicbrainz.c	2006-08-29 01:47:03.000000000 +0200
    3 +++ mb-ruby-0.3.0/musicbrainz.c	2009-10-26 19:33:21.397764820 +0100
    4 @@ -462,7 +462,7 @@
    5        break;
    6      default:
    7        /* grab object */
    8 -      obj = RSTRING(argv[0])->ptr;
    9 +      obj = RSTRING_PTR(argv[0]);
   10  
   11        /* allocate argument list */
   12        if ((args = malloc(sizeof(char*) * argc)) == NULL)
   13 @@ -470,7 +470,7 @@
   14  
   15        /* add each argument list, then terminate the list  */
   16        for (i = 1; i < argc; i++)
   17 -        args[i - 1] = RSTRING(argv[i])->ptr;
   18 +        args[i - 1] = RSTRING_PTR(argv[i]);
   19        args[argc - 1] = NULL;
   20  
   21        /* execute query and free argument list */
   22 @@ -1128,8 +1128,8 @@
   23    int len;
   24  
   25    Data_Get_Struct(self, trm_t, trm);
   26 -  ptr = RSTRING(buf)->ptr;
   27 -  len = RSTRING(buf)->len;
   28 +  ptr = RSTRING_PTR(buf);
   29 +  len = RSTRING_LEN(buf);
   30  
   31    return trm_GenerateSignature(*trm, ptr, len) ? Qtrue : Qfalse;
   32  }
   33 @@ -1159,7 +1159,7 @@
   34        break;
   35      case 1:
   36        if (argv[0] != Qnil)
   37 -        id = RSTRING(argv[0])->ptr;
   38 +        id = RSTRING_PTR(argv[0]);
   39        break;
   40      default:
   41        rb_raise(eErr, "Invalid argument count: %d.", argc);

Generated by cgit