X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Ffilenames.c;h=1787339359c41519be65332e632cf78669b1e10b;hb=777b02a7d7b922bcae08af1c16e475051ec7d8f3;hp=656c58e6f40dfdc87bcbc86b6dd7b2eb2680ecab;hpb=045f0e455ac94e2393d0d729c9bbdf3459a4860f;p=notmuch diff --git a/bindings/ruby/filenames.c b/bindings/ruby/filenames.c index 656c58e6..17873393 100644 --- a/bindings/ruby/filenames.c +++ b/bindings/ruby/filenames.c @@ -20,6 +20,12 @@ #include "defs.h" +VALUE +notmuch_rb_filenames_get (notmuch_filenames_t *fnames) +{ + return Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, ¬much_rb_filenames_type, fnames); +} + /* * call-seq: FILENAMES.destroy! => nil * @@ -28,12 +34,7 @@ VALUE notmuch_rb_filenames_destroy (VALUE self) { - notmuch_filenames_t *fnames; - - Data_Get_Notmuch_FileNames (self, fnames); - - notmuch_filenames_destroy (fnames); - DATA_PTR (self) = NULL; + notmuch_rb_object_destroy (self, ¬much_rb_filenames_type); return Qnil; }