On Wed, May 12, 2021 at 4:59 PM David Bremner <david@tethera.net> wrote: > > Felipe Contreras <felipe.contreras@gmail.com> writes: > > > The type is not actually needed. > > > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> > > --- > > 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 > > +++ b/bindings/ruby/defs.h > > @@ -55,39 +55,39 @@ extern ID ID_db_mode; > > # define RSTRING_PTR(v) (RSTRING((v))->ptr) > > #endif /* !defined (RSTRING_PTR) */ > > > > -#define Data_Get_Notmuch_Object(obj, type, message, ptr) \ > > +#define Data_Get_Notmuch_Object(obj, message, ptr) \ > > do { \ > > - Data_Get_Struct ((obj), type, (ptr)); \ > > + (ptr) = rb_data_object_get ((obj)); \ > > Please explain a bit more in the commit message what's going on > here. Why is it OK to replace Data_Get_Struct with rb_data_object_get? Data_Get_Struct is nothing but a macro that calls rb_data_object_get with a cast (unnecessary in C). #define Data_Get_Struct(obj, type, sval) \ ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj))) Is that explanation sufficient? -- Felipe Contreras _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org