mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 01:14:53 +01:00
ruby: add tags helper
Right now it doesn't do much, but it will help for further reorganization. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
parent
6273966d0b
commit
ae1336dea5
6 changed files with 13 additions and 4 deletions
|
@ -412,7 +412,7 @@ notmuch_rb_database_get_all_tags (VALUE self)
|
|||
|
||||
rb_raise (notmuch_rb_eBaseError, "%s", msg);
|
||||
}
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags);
|
||||
return notmuch_rb_tags_get (tags);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -369,6 +369,9 @@ VALUE
|
|||
notmuch_rb_message_thaw (VALUE self);
|
||||
|
||||
/* tags.c */
|
||||
VALUE
|
||||
notmuch_rb_tags_get (notmuch_tags_t *tags);
|
||||
|
||||
VALUE
|
||||
notmuch_rb_tags_destroy (VALUE self);
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ notmuch_rb_message_get_tags (VALUE self)
|
|||
if (!tags)
|
||||
rb_raise (notmuch_rb_eMemoryError, "Out of memory");
|
||||
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags);
|
||||
return notmuch_rb_tags_get (tags);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -71,5 +71,5 @@ notmuch_rb_messages_collect_tags (VALUE self)
|
|||
if (!tags)
|
||||
rb_raise (notmuch_rb_eMemoryError, "Out of memory");
|
||||
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags);
|
||||
return notmuch_rb_tags_get (tags);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -204,5 +204,5 @@ notmuch_rb_thread_get_tags (VALUE self)
|
|||
if (!tags)
|
||||
rb_raise (notmuch_rb_eMemoryError, "Out of memory");
|
||||
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags);
|
||||
return notmuch_rb_tags_get (tags);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue