X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Fthreads.c;h=50280260a4d3aa9576f4d09c7d9528ed6be6539c;hb=5f49e3421f5d1f98951b55dd5ba106c2a106aba7;hp=5885f5651ceeb100b3011557d462c8bdba29d586;hpb=c84ccb70f3ed2b2228346499b5110311039a0ecf;p=notmuch diff --git a/bindings/ruby/threads.c b/bindings/ruby/threads.c index 5885f565..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_Struct (notmuch_rb_cThread, NULL, NULL, thread)); + rb_yield (Data_Wrap_Notmuch_Object (notmuch_rb_cThread, ¬much_rb_thread_type, thread)); } return self;