]> git.cworth.org Git - notmuch/blobdiff - bindings/ruby/directory.c
ruby: add all data types
[notmuch] / bindings / ruby / directory.c
index 303523c2dc69df0c27af45a74e66eb837e99aa7d..17d60d1d049c50d6d98457cd8354cb97a2347694 100644 (file)
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/ .
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
  *
  * Author: Ali Polatel <alip@exherbo.org>
  */
@@ -30,7 +30,7 @@ notmuch_rb_directory_destroy (VALUE self)
 {
     notmuch_directory_t *dir;
 
-    Data_Get_Struct (self, notmuch_directory_t, dir);
+    Data_Get_Notmuch_Directory (self, dir);
 
     notmuch_directory_destroy (dir);
     DATA_PTR (self) = NULL;
@@ -92,7 +92,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 Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, &notmuch_rb_filenames_type, fnames);
 }
 
 /*
@@ -111,5 +111,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 Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, &notmuch_rb_filenames_type, fnames);
 }