X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fruby%2Fthread.c;h=e5c873667a20ce05973b7b30cf0a9e748ee51553;hp=5534fe3f38334323fa14b13976f75e91e52dc1ae;hb=5c9e385591b66fa20cbb186393c48c52831a23b7;hpb=d2a457a5d8238c54445a8a6066f79c112ebd3a04 diff --git a/bindings/ruby/thread.c b/bindings/ruby/thread.c index 5534fe3f..e5c87366 100644 --- a/bindings/ruby/thread.c +++ b/bindings/ruby/thread.c @@ -30,9 +30,10 @@ notmuch_rb_thread_destroy(VALUE self) { notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); notmuch_thread_destroy(thread); + DATA_PTR(self) = NULL; return Qnil; } @@ -48,7 +49,7 @@ notmuch_rb_thread_get_thread_id(VALUE self) const char *tid; notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); tid = notmuch_thread_get_thread_id(thread); @@ -65,7 +66,7 @@ notmuch_rb_thread_get_total_messages(VALUE self) { notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); return INT2FIX(notmuch_thread_get_total_messages(thread)); } @@ -81,7 +82,7 @@ notmuch_rb_thread_get_toplevel_messages(VALUE self) notmuch_messages_t *messages; notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); messages = notmuch_thread_get_toplevel_messages(thread); if (!messages) @@ -100,7 +101,7 @@ notmuch_rb_thread_get_matched_messages(VALUE self) { notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); return INT2FIX(notmuch_thread_get_matched_messages(thread)); } @@ -116,7 +117,7 @@ notmuch_rb_thread_get_authors(VALUE self) const char *authors; notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); authors = notmuch_thread_get_authors(thread); @@ -134,7 +135,7 @@ notmuch_rb_thread_get_subject(VALUE self) const char *subject; notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); subject = notmuch_thread_get_subject(thread); @@ -151,7 +152,7 @@ notmuch_rb_thread_get_oldest_date(VALUE self) { notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); return UINT2NUM(notmuch_thread_get_oldest_date(thread)); } @@ -166,7 +167,7 @@ notmuch_rb_thread_get_newest_date(VALUE self) { notmuch_thread_t *thread; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); return UINT2NUM(notmuch_thread_get_newest_date(thread)); } @@ -182,7 +183,7 @@ notmuch_rb_thread_get_tags(VALUE self) notmuch_thread_t *thread; notmuch_tags_t *tags; - Data_Get_Struct(self, notmuch_thread_t, thread); + Data_Get_Notmuch_Thread(self, thread); tags = notmuch_thread_get_tags(thread); if (!tags)