]> git.notmuchmail.org Git - notmuch/commit
ruby: simplify data get helper
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 15 May 2021 21:20:57 +0000 (16:20 -0500)
committerDavid Bremner <david@tethera.net>
Mon, 17 May 2021 10:25:14 +0000 (07:25 -0300)
commit78c059a24c47f7a2beaa7cd78ce7b8b3cff07d65
tree07981a33117529fdca96ad36173528536b750003
parentc84ccb70f3ed2b2228346499b5110311039a0ecf
ruby: simplify data get helper

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)))

We can use rb_data_object_get directly, and this way we don't need to
pass the type, which is unnecessary information.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
bindings/ruby/defs.h