X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fruby%2Fthread.c;h=7cb2a3dcc6ebeacdd5c4c37b726a53056c436a5c;hp=e09be147f4930cdcaa0dfe1fa1e97adc6320d7a4;hb=HEAD;hpb=12c36a5e3f676d5108cede6ac09204fb62fa20b1 diff --git a/bindings/ruby/thread.c b/bindings/ruby/thread.c index e09be147..b20ed893 100644 --- a/bindings/ruby/thread.c +++ b/bindings/ruby/thread.c @@ -28,12 +28,7 @@ VALUE notmuch_rb_thread_destroy (VALUE self) { - notmuch_thread_t *thread; - - Data_Get_Notmuch_Thread (self, thread); - - notmuch_thread_destroy (thread); - DATA_PTR (self) = NULL; + notmuch_rb_object_destroy (self, ¬much_rb_thread_type); return Qnil; } @@ -88,7 +83,7 @@ notmuch_rb_thread_get_toplevel_messages (VALUE self) if (!messages) rb_raise (notmuch_rb_eMemoryError, "Out of memory"); - return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, messages); + return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, ¬much_rb_messages_type, messages); } /* @@ -108,7 +103,7 @@ notmuch_rb_thread_get_messages (VALUE self) if (!messages) rb_raise (notmuch_rb_eMemoryError, "Out of memory"); - return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, messages); + return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, ¬much_rb_messages_type, messages); } /* @@ -209,5 +204,5 @@ notmuch_rb_thread_get_tags (VALUE self) if (!tags) rb_raise (notmuch_rb_eMemoryError, "Out of memory"); - return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, tags); + return notmuch_rb_tags_get (tags); }