aboutsummaryrefslogtreecommitdiff
path: root/bindings/ruby/thread.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2021-05-15 16:21:00 -0500
committerDavid Bremner <david@tethera.net>2021-05-17 07:25:14 -0300
commit12c36a5e3f676d5108cede6ac09204fb62fa20b1 (patch)
tree706ea58c38cc01dca60d0d1e2661495512918668 /bindings/ruby/thread.c
parent682479592b33b13a22143f4fe67678c066bf223a (diff)
ruby: create Data_Wrap_Notmuch_Object helper
This makes the code more maintainable and will help in further patches. No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'bindings/ruby/thread.c')
-rw-r--r--bindings/ruby/thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bindings/ruby/thread.c b/bindings/ruby/thread.c
index 9b295981..e09be147 100644
--- a/bindings/ruby/thread.c
+++ b/bindings/ruby/thread.c
@@ -88,7 +88,7 @@ notmuch_rb_thread_get_toplevel_messages (VALUE self)
if (!messages)
rb_raise (notmuch_rb_eMemoryError, "Out of memory");
- return Data_Wrap_Struct (notmuch_rb_cMessages, NULL, NULL, messages);
+ return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, messages);
}
/*
@@ -108,7 +108,7 @@ notmuch_rb_thread_get_messages (VALUE self)
if (!messages)
rb_raise (notmuch_rb_eMemoryError, "Out of memory");
- return Data_Wrap_Struct (notmuch_rb_cMessages, NULL, NULL, messages);
+ return Data_Wrap_Notmuch_Object (notmuch_rb_cMessages, messages);
}
/*
@@ -209,5 +209,5 @@ notmuch_rb_thread_get_tags (VALUE self)
if (!tags)
rb_raise (notmuch_rb_eMemoryError, "Out of memory");
- return Data_Wrap_Struct (notmuch_rb_cTags, NULL, NULL, tags);
+ return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, tags);
}