]> git.cworth.org Git - notmuch/blobdiff - bindings/ruby/directory.c
ruby: new notmuch_rb_object_destroy() helper
[notmuch] / bindings / ruby / directory.c
index 17d60d1d049c50d6d98457cd8354cb97a2347694..910f0a99f238239f2c5717b2a85b2cbca190bcf5 100644 (file)
 VALUE
 notmuch_rb_directory_destroy (VALUE self)
 {
-    notmuch_directory_t *dir;
-
-    Data_Get_Notmuch_Directory (self, dir);
-
-    notmuch_directory_destroy (dir);
-    DATA_PTR (self) = NULL;
+    notmuch_rb_object_destroy (self, &notmuch_rb_directory_type);
 
     return Qnil;
 }