unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/3] ruby: get rid of FileNames object
@ 2023-03-27 21:59 Felipe Contreras
  2023-03-27 21:59 ` [PATCH 1/3] ruby: add filenames helper Felipe Contreras
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Felipe Contreras @ 2023-03-27 21:59 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-12 10:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-27 21:59 [PATCH 0/3] ruby: get rid of FileNames object Felipe Contreras
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

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).