ruby: improve general data get helper

There's no need to do Check_Type, Data_Get_Struct calls
rb_data_object_get(), which already does that.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras 2021-05-04 03:17:42 -05:00 committed by David Bremner
parent 2e57ffb860
commit a34d7b4144

View file

@ -57,10 +57,9 @@ extern ID ID_db_mode;
#define Data_Get_Notmuch_Object(obj, type, message, ptr) \
do { \
Check_Type ((obj), T_DATA); \
if (DATA_PTR ((obj)) == NULL) \
rb_raise (rb_eRuntimeError, (message)); \
Data_Get_Struct ((obj), type, (ptr)); \
if (!(ptr)) \
rb_raise (rb_eRuntimeError, (message)); \
} while (0)
#define Data_Get_Notmuch_Database(obj, ptr) \