unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 0/3] ruby: get rid of FileNames object
Date: Mon, 27 Mar 2023 15:59:39 -0600	[thread overview]
Message-ID: <20230327215942.13286-1-felipe.contreras@gmail.com> (raw)

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

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

This is the same approach I took with the Tags object, I was waiting for
feedback on that approach but since there isn't any and there's no reason this
shouldn't work, here's the same for Filenames.

Felipe Contreras (3):
  ruby: add filenames helper
  ruby: filenames: return string array directly
  ruby: remove FileNames object

 bindings/ruby/defs.h      |  9 +------
 bindings/ruby/directory.c |  4 +--
 bindings/ruby/filenames.c | 51 +++------------------------------------
 bindings/ruby/init.c      | 14 -----------
 bindings/ruby/message.c   |  2 +-
 5 files changed, 8 insertions(+), 72 deletions(-)

-- 
2.39.2.13.g1fb56cf030

             reply	other threads:[~2023-03-27 21:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 21:59 Felipe Contreras [this message]
2023-03-27 21:59 ` [PATCH 1/3] ruby: add filenames helper Felipe Contreras
2023-03-27 21:59 ` [PATCH 2/3] ruby: filenames: return string array directly Felipe Contreras
2023-03-27 21:59 ` [PATCH 3/3] ruby: remove FileNames object Felipe Contreras
2023-04-12 10:35   ` David Bremner
2023-03-28  0:13 ` [PATCH 0/3] ruby: get rid of " David Bremner
2023-03-28  6:47   ` Felipe Contreras
2023-03-28  6:51     ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230327215942.13286-1-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).