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;
> > +
> > +
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
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 +--