]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/ruby/message.c
ruby: new notmuch_rb_object_destroy() helper
[notmuch] / bindings / ruby / message.c
index b3aed604033aff41ff49d4eba324bfe502a50f50..f45c95cc5051d8475920c5a59bf07706e829e0be 100644 (file)
 VALUE
 notmuch_rb_message_destroy (VALUE self)
 {
-    notmuch_message_t *message;
-
-    Data_Get_Notmuch_Message (self, message);
-
-    notmuch_message_destroy (message);
-    DATA_PTR (self) = NULL;
+    notmuch_rb_object_destroy (self, &notmuch_rb_message_type);
 
     return Qnil;
 }