mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
ruby: tags: return string array directly
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
parent
ae1336dea5
commit
3a52290609
1 changed files with 7 additions and 1 deletions
|
@ -23,7 +23,13 @@
|
||||||
VALUE
|
VALUE
|
||||||
notmuch_rb_tags_get (notmuch_tags_t *tags)
|
notmuch_rb_tags_get (notmuch_tags_t *tags)
|
||||||
{
|
{
|
||||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags);
|
VALUE rb_array = rb_ary_new ();
|
||||||
|
|
||||||
|
for (; notmuch_tags_valid (tags); notmuch_tags_move_to_next (tags)) {
|
||||||
|
const char *tag = notmuch_tags_get (tags);
|
||||||
|
rb_ary_push (rb_array, rb_str_new2 (tag));
|
||||||
|
}
|
||||||
|
return rb_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue