]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/ruby/messages.c
ruby: new notmuch_rb_object_destroy() helper
[notmuch] / bindings / ruby / messages.c
index e04f3af143bb30a4bcffea595615fc7e9ae5e6ff..ca5b10d04b09702629eddbeb1eb217bef84a4274 100644 (file)
 VALUE
 notmuch_rb_messages_destroy (VALUE self)
 {
-    notmuch_messages_t *messages;
-
-    Data_Get_Notmuch_Messages (self, messages);
-
-    notmuch_messages_destroy (messages);
-    DATA_PTR (self) = NULL;
+    notmuch_rb_object_destroy (self, &notmuch_rb_messages_type);
 
     return Qnil;
 }