]> git.cworth.org Git - notmuch/blobdiff - bindings/ruby/init.c
ruby: add all data types
[notmuch] / bindings / ruby / init.c
index 819fd1e35dc87a85945b57791149748910134ce3..a9f863ebd22cb1fc4e4c774fd1f8f8729fa47c25 100644 (file)
@@ -46,6 +46,26 @@ ID ID_call;
 ID ID_db_create;
 ID ID_db_mode;
 
+const rb_data_type_t notmuch_rb_object_type = {
+    .wrap_struct_name = "notmuch_object",
+};
+
+#define define_type(id) \
+    const rb_data_type_t notmuch_rb_ ## id ## _type = { \
+       .wrap_struct_name = "notmuch_" #id, \
+       .parent = &notmuch_rb_object_type, \
+    }
+
+define_type (database);
+define_type (directory);
+define_type (filenames);
+define_type (query);
+define_type (threads);
+define_type (thread);
+define_type (messages);
+define_type (message);
+define_type (tags);
+
 /*
  * Document-module: Notmuch
  *