]> git.notmuchmail.org Git - notmuch/commit
ruby: create an actual wrapper struct
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 17 May 2021 19:39:14 +0000 (14:39 -0500)
committerDavid Bremner <david@tethera.net>
Sun, 18 Jul 2021 20:08:42 +0000 (17:08 -0300)
commit02b162116079a0b2e35823e5590a82056d22c8af
treedb730bca9f8619f356a028cdef059ef7783df814
parent02cf4a50bb531aab7afdb1b48ecc656211b791e8
ruby: create an actual wrapper struct

Currently Ruby data points directly to a notmuch object (e.g.
notmuch_database_t), since we don't need any extra data that is fine.

However, in the next commit we will need extra data, therefore we create
a new struct notmuch_rb_object_t wrapper which contains nothing but a
pointer to the current pointer (e.g. notmuch_database_t).

This struct is tied to the Ruby object, and is freed when the Ruby
object is freed by the garbage collector.

We do nothing with this wrapper, so no functionality should be changed.

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