mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
ruby: add unlikely hint
The error path is very unlikely. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
parent
79bb82c217
commit
682479592b
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ extern ID ID_db_mode;
|
||||||
#define Data_Get_Notmuch_Object(obj, ptr) \
|
#define Data_Get_Notmuch_Object(obj, ptr) \
|
||||||
do { \
|
do { \
|
||||||
(ptr) = rb_data_object_get ((obj)); \
|
(ptr) = rb_data_object_get ((obj)); \
|
||||||
if (!(ptr)) { \
|
if (RB_UNLIKELY (!(ptr))) { \
|
||||||
VALUE cname = rb_class_name (CLASS_OF ((obj))); \
|
VALUE cname = rb_class_name (CLASS_OF ((obj))); \
|
||||||
rb_raise (rb_eRuntimeError, "%"PRIsVALUE" object destroyed", cname); \
|
rb_raise (rb_eRuntimeError, "%"PRIsVALUE" object destroyed", cname); \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Reference in a new issue