X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Fthreads.c;h=50280260a4d3aa9576f4d09c7d9528ed6be6539c;hb=2474bce8b1a5b8011b19d8ff5cc84957e71e1917;hp=19e09a7e272a8344dcd0fa4acf50cef905044965;hpb=12c36a5e3f676d5108cede6ac09204fb62fa20b1;p=notmuch diff --git a/bindings/ruby/threads.c b/bindings/ruby/threads.c index 19e09a7e..50280260 100644 --- a/bindings/ruby/threads.c +++ b/bindings/ruby/threads.c @@ -28,12 +28,7 @@ VALUE notmuch_rb_threads_destroy (VALUE self) { - notmuch_threads_t *threads; - - Data_Get_Notmuch_Threads (self, threads); - - notmuch_threads_destroy (threads); - DATA_PTR (self) = NULL; + notmuch_rb_object_destroy (self, ¬much_rb_threads_type); return Qnil; } @@ -53,7 +48,7 @@ notmuch_rb_threads_each (VALUE self) for (; notmuch_threads_valid (threads); notmuch_threads_move_to_next (threads)) { thread = notmuch_threads_get (threads); - rb_yield (Data_Wrap_Notmuch_Object (notmuch_rb_cThread, thread)); + rb_yield (Data_Wrap_Notmuch_Object (notmuch_rb_cThread, ¬much_rb_thread_type, thread)); } return self;