[PATCH 0/3] ruby: get rid of Tags object

Subject: [PATCH 0/3] ruby: get rid of Tags object

Date: Wed, 22 Mar 2023 17:43:43 -0600

To: notmuch@notmuchmail.org

Cc: arcnmx

From: Felipe Contreras


We don't need a Tags enumerable object only for a small number of strings, we
can just get them directly.

This fixes an interaction problem where we might request two tags iterables
from the same message:

  tags_0 = notmuch_message_get_tags(message);
  // Store it for later
  tags_1 = notmuch_message_get_tags(message);
  // Traverse it

This iterator is meant to be transient and works only once, so we better just
iterate it once.

Felipe Contreras (3):
  ruby: add tags helper
  ruby: tags: return string array directly
  ruby: remove Tags object

 bindings/ruby/database.c |  2 +-
 bindings/ruby/defs.h     |  6 +----
 bindings/ruby/init.c     | 14 -----------
 bindings/ruby/message.c  |  2 +-
 bindings/ruby/messages.c |  2 +-
 bindings/ruby/tags.c     | 54 ++++------------------------------------
 bindings/ruby/thread.c   |  2 +-
 7 files changed, 10 insertions(+), 72 deletions(-)

-- 
2.39.2.13.g1fb56cf030

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: