[PATCH 2/2] ruby: database: make path arg optional

2023-03-22 Thread Felipe Contreras
It can be automatically loaded from the configuration now. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 10 +++--- test/T395-ruby.sh| 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index

[PATCH 1/2] ruby: use database_open_with_config

2023-03-22 Thread Felipe Contreras
Fixes warning: warning: ‘notmuch_database_open’ is deprecated: function deprecated as of libnotmuch 5.4 Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index

[PATCH 0/2] ruby: database open improvements

2023-03-22 Thread Felipe Contreras
Essentially we want to do notmuch_database_open_with_config() and load the default database. Felipe Contreras (2): ruby: use database_open_with_config ruby: database: make path arg optional bindings/ruby/database.c | 12 test/T395-ruby.sh| 2 +- 2 files changed, 9

Re: BUG: ruby segfault in notmuch_rb_tags_each

2023-03-22 Thread Felipe Contreras
On Thu, May 5, 2022 at 9:16 AM David Bremner wrote: > > arcnmx writes: > > > Hi, I've been running into rare crashes via notmuch-vim for a while now and > > finally got around to tracking down the problem. I apologize for the size > > of the reproduction case, but at least it can be reproduced!

Re: BUG: ruby segfault in notmuch_rb_tags_each

2023-03-22 Thread Felipe Contreras
On Sat, Apr 30, 2022 at 5:09 PM arcnmx wrote: > > Hi, I've been running into rare crashes via notmuch-vim for a while now and > finally got around to tracking down the problem. I apologize for the size of > the reproduction case, but at least it can be reproduced! Thanks for the reproduction

[PATCH 3/3] ruby: remove Tags object

2023-03-22 Thread Felipe Contreras
Not used anymore now that we return an array of strings directly. Signed-off-by: Felipe Contreras --- bindings/ruby/defs.h | 7 -- bindings/ruby/init.c | 14 --- bindings/ruby/tags.c | 55 3 files changed, 76 deletions(-) diff --git

[PATCH 2/3] ruby: tags: return string array directly

2023-03-22 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- bindings/ruby/tags.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/ruby/tags.c b/bindings/ruby/tags.c index cc6ea59e..cad17d4c 100644 --- a/bindings/ruby/tags.c +++ b/bindings/ruby/tags.c @@ -23,7 +23,12 @@ VALUE

[PATCH 1/3] ruby: add tags helper

2023-03-22 Thread Felipe Contreras
Right now it doesn't do much, but it will help for further reorganization. Signed-off-by: Felipe Contreras --- bindings/ruby/database.c | 2 +- bindings/ruby/defs.h | 3 +++ bindings/ruby/message.c | 2 +- bindings/ruby/messages.c | 2 +- bindings/ruby/tags.c | 6 ++

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

2023-03-22 Thread 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 =