]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/ruby/directory.c
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / bindings / ruby / directory.c
index fe5fc46d1145328676d574661dc0089a267cf0e3..f267d82f16976ee7fec41779c11d332ab7ac35ad 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;
 }
@@ -92,7 +87,7 @@ notmuch_rb_directory_get_child_files (VALUE self)
 
     fnames = notmuch_directory_get_child_files (dir);
 
-    return Data_Wrap_Struct (notmuch_rb_cFileNames, NULL, NULL, fnames);
+    return notmuch_rb_filenames_get (fnames);
 }
 
 /*
@@ -111,5 +106,5 @@ notmuch_rb_directory_get_child_directories (VALUE self)
 
     fnames = notmuch_directory_get_child_directories (dir);
 
-    return Data_Wrap_Struct (notmuch_rb_cFileNames, NULL, NULL, fnames);
+    return notmuch_rb_filenames_get (fnames);
 }