aboutsummaryrefslogtreecommitdiff
path: root/bindings/ruby/defs.h
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2021-05-15 16:20:59 -0500
committerDavid Bremner <david@tethera.net>2021-05-17 07:25:14 -0300
commit682479592b33b13a22143f4fe67678c066bf223a (patch)
treee612fe65908f1c009556606a5e05f6f39c60689d /bindings/ruby/defs.h
parent79bb82c2179ea0dd5de384bb1ab6f0f118a035df (diff)
ruby: add unlikely hint
The error path is very unlikely. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'bindings/ruby/defs.h')
-rw-r--r--bindings/ruby/defs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index ae3ea101..12538a3a 100644
--- a/bindings/ruby/defs.h
+++ b/bindings/ruby/defs.h
@@ -58,7 +58,7 @@ extern ID ID_db_mode;
#define Data_Get_Notmuch_Object(obj, ptr) \
do { \
(ptr) = rb_data_object_get ((obj)); \
- if (!(ptr)) { \
+ if (RB_UNLIKELY (!(ptr))) { \
VALUE cname = rb_class_name (CLASS_OF ((obj))); \
rb_raise (rb_eRuntimeError, "%"PRIsVALUE" object destroyed", cname); \
} \