aboutsummaryrefslogtreecommitdiff
path: root/bindings/ruby/init.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2021-05-15 16:21:02 -0500
committerDavid Bremner <david@tethera.net>2021-05-17 07:25:14 -0300
commit9574fb60991fa81799fbd1d26d41693ca2794e6b (patch)
treeba33e4b827c0a28cab95b876ed2eb0af2fbcbb09 /bindings/ruby/init.c
parentfba9774a81e90a179ccfa810c47a501eaf266e2b (diff)
ruby: add all data types
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'bindings/ruby/init.c')
-rw-r--r--bindings/ruby/init.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
index f3b2e5b1..a9f863eb 100644
--- a/bindings/ruby/init.c
+++ b/bindings/ruby/init.c
@@ -50,6 +50,22 @@ 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
*