Matt Lundin writes:
> With the upgrade to notmuch 0.32, functions added to
> 'notmuch-after-tag-hook' or 'notmuch-before-tag-hook' no longer have
> access to the 'tag-changes' or 'query' variables advertised in the
> docstrings of both hooks. If I try to access either variable in a hook
>
With the upgrade to notmuch 0.32, functions added to
'notmuch-after-tag-hook' or 'notmuch-before-tag-hook' no longer have
access to the 'tag-changes' or 'query' variables advertised in the
docstrings of both hooks. If I try to access either variable in a hook
function, emacs throws an error. I
On Tue, May 4, 2021 at 3:17 AM Felipe Contreras
wrote:
>
> This superseeds my previous series [1] with much more cleanups.
>
> An important new change is the move towards RTypedData, which is way superior
> to the old RData
> objects.
>
> Everything should work basically the same though.
Please
Using the rb_data_type_t data we can call the correct notmuch destroy
function.
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 6 +-
bindings/ruby/defs.h | 14 ++
bindings/ruby/directory.c | 7 +--
bindings/ruby/filenames.c | 7 +--
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 16
bindings/ruby/defs.h | 37 +++--
bindings/ruby/directory.c | 4 ++--
bindings/ruby/init.c | 16
bindings/ruby/message.c | 6 +++---
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 2 +-
bindings/ruby/defs.h | 6 --
bindings/ruby/init.c | 4
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c
index b9ad3373..bb4273e6 100644
---
This makes the code more maintainable and will help in further patches.
No functional changes.
Signed-off-by: Felipe Contreras
---
bindings/ruby/database.c | 14 +++---
bindings/ruby/defs.h | 3 +++
bindings/ruby/directory.c | 4 ++--
bindings/ruby/message.c | 6 +++---
The error path is very unlikely.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index ae3ea101..12538a3a 100644
--- a/bindings/ruby/defs.h
+++ b/bindings/ruby/defs.h
@@
There is not much point in complicating the code for error messages that
can be easily constructed.
Before:
database closed (RuntimeError)
After:
Notmuch::Database object destroyed (RuntimeError)
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 30
The type is not actually needed.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index 46e2caf8..8fb47b4c 100644
--- a/bindings/ruby/defs.h
+++
There's no need to do Check_Type, Data_Get_Struct calls
rb_data_object_get(), which already does that.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index
There's no need to repeat the same code over and over.
Signed-off-by: Felipe Contreras
---
bindings/ruby/defs.h | 81
1 file changed, 22 insertions(+), 59 deletions(-)
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index 48544ca2..e95ea239
Apparently commit 5c9e3855 (ruby: Don't barf if an object is destroyed
more than once, 2010-05-26) missed these two.
Signed-off-by: Felipe Contreras
---
bindings/ruby/directory.c | 2 +-
bindings/ruby/threads.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
This superseeds my previous series [1] with much more cleanups.
An important new change is the move towards RTypedData, which is way superior
to the old RData
objects.
Everything should work basically the same though.
[1] id: 20210503075457.649056-1-felipe.contre...@gmail.com
Felipe Contreras
14 matches
Mail list logo