X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Fmessage.c;h=f45c95cc5051d8475920c5a59bf07706e829e0be;hb=2474bce8b1a5b8011b19d8ff5cc84957e71e1917;hp=1990bb979c425e10aaeeb20e2fe54f67c30164c7;hpb=12c36a5e3f676d5108cede6ac09204fb62fa20b1;p=notmuch diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c index 1990bb97..f45c95cc 100644 --- a/bindings/ruby/message.c +++ b/bindings/ruby/message.c @@ -28,12 +28,7 @@ VALUE notmuch_rb_message_destroy (VALUE self) { - notmuch_message_t *message; - - Data_Get_Notmuch_Message (self, message); - - notmuch_message_destroy (message); - DATA_PTR (self) = NULL; + notmuch_rb_object_destroy (self, ¬much_rb_message_type); return Qnil; } @@ -89,7 +84,7 @@ notmuch_rb_message_get_replies (VALUE self) messages = notmuch_message_get_replies (message); - return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, messages); + return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, ¬much_rb_messages_type, messages); } /* @@ -125,7 +120,7 @@ notmuch_rb_message_get_filenames (VALUE self) fnames = notmuch_message_get_filenames (message); - return Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, fnames); + return Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, ¬much_rb_filenames_type, fnames); } /* @@ -226,7 +221,7 @@ notmuch_rb_message_get_tags (VALUE self) if (!tags) rb_raise (notmuch_rb_eMemoryError, "Out of memory"); - return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, tags); + return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags); } /*