X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Ftags.c;h=cc6ea59ece07ca5aacfebc8d776f28c54b593992;hb=ae1336dea5cc6a221699fff260d8b44cee677f77;hp=db8b4cfc86f0b3eaa818ce0d7876862158826862;hpb=045f0e455ac94e2393d0d729c9bbdf3459a4860f;p=notmuch diff --git a/bindings/ruby/tags.c b/bindings/ruby/tags.c index db8b4cfc..cc6ea59e 100644 --- a/bindings/ruby/tags.c +++ b/bindings/ruby/tags.c @@ -20,6 +20,12 @@ #include "defs.h" +VALUE +notmuch_rb_tags_get (notmuch_tags_t *tags) +{ + return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags); +} + /* * call-seq: TAGS.destroy! => nil * @@ -28,12 +34,7 @@ VALUE notmuch_rb_tags_destroy (VALUE self) { - notmuch_tags_t *tags; - - Data_Get_Notmuch_Tags (self, tags); - - notmuch_tags_destroy (tags); - DATA_PTR (self) = NULL; + notmuch_rb_object_destroy (self, ¬much_rb_tags_type); return Qnil; }