summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
79bb82c)
The error path is very unlikely.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
#define Data_Get_Notmuch_Object(obj, ptr) \
do { \
(ptr) = rb_data_object_get ((obj)); \
#define Data_Get_Notmuch_Object(obj, ptr) \
do { \
(ptr) = rb_data_object_get ((obj)); \
+ if (RB_UNLIKELY (!(ptr))) { \
VALUE cname = rb_class_name (CLASS_OF ((obj))); \
rb_raise (rb_eRuntimeError, "%"PRIsVALUE" object destroyed", cname); \
} \
VALUE cname = rb_class_name (CLASS_OF ((obj))); \
rb_raise (rb_eRuntimeError, "%"PRIsVALUE" object destroyed", cname); \
} \