X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fruby%2Fmessage.c;h=f45c95cc5051d8475920c5a59bf07706e829e0be;hp=6ea82afa20c5071086883b437054d80613e7a45d;hb=HEAD;hpb=49d630d0f389e0bfb08a83178582f4a38f1ec664 diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c index 6ea82afa..13c182f6 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_Struct (notmuch_rb_cMessages, NULL, NULL, 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_Struct (notmuch_rb_cFileNames, NULL, NULL, fnames); + return notmuch_rb_filenames_get (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_Struct (notmuch_rb_cTags, NULL, NULL, tags); + return notmuch_rb_tags_get (tags); } /*