Re: [PATCH v2 10/10] ruby: new notmuch_rb_object_destroy() helper

2021-05-12 Thread Felipe Contreras
On Wed, May 12, 2021 at 5:10 PM David Bremner wrote: > > Felipe Contreras writes: > > > +static inline notmuch_status_t > > +notmuch_rb_object_destroy (VALUE rb_object, const rb_data_type_t *type) > > +{ > > +void *nm_object; > > +notmuch_status_t ret; > > + > > +

Re: [PATCH v2 10/10] ruby: new notmuch_rb_object_destroy() helper

2021-05-12 Thread David Bremner
Felipe Contreras writes: > +static inline notmuch_status_t > +notmuch_rb_object_destroy (VALUE rb_object, const rb_data_type_t *type) > +{ > +void *nm_object; > +notmuch_status_t ret; > + > +Data_Get_Notmuch_Object (rb_object, type, nm_object); > + > +ret = ((notmuch_status_t

[PATCH v2 10/10] ruby: new notmuch_rb_object_destroy() helper

2021-05-04 Thread Felipe Contreras
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 +--