X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Fdirectory.c;h=f267d82f16976ee7fec41779c11d332ab7ac35ad;hb=HEAD;hp=36ef398443cf9c64fd9f0dc22e0a69a6817eccc3;hpb=12c36a5e3f676d5108cede6ac09204fb62fa20b1;p=notmuch diff --git a/bindings/ruby/directory.c b/bindings/ruby/directory.c index 36ef3984..f267d82f 100644 --- a/bindings/ruby/directory.c +++ b/bindings/ruby/directory.c @@ -28,12 +28,7 @@ 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, ¬much_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_Notmuch_Object (notmuch_rb_cFileNames, 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_Notmuch_Object (notmuch_rb_cFileNames, fnames); + return notmuch_rb_filenames_get (fnames); }