X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Ftags.c;h=cc6ea59ece07ca5aacfebc8d776f28c54b593992;hb=ae1336dea5cc6a221699fff260d8b44cee677f77;hp=e8226ad7433f71c1a73e37ef3cf1a0d417228d5b;hpb=05dddf883dd762420bb8e6b86790e68d734fd568;p=notmuch diff --git a/bindings/ruby/tags.c b/bindings/ruby/tags.c index e8226ad7..cc6ea59e 100644 --- a/bindings/ruby/tags.c +++ b/bindings/ruby/tags.c @@ -13,13 +13,19 @@ * 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 */ #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; }