X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fruby%2Fmessage.c;fp=bindings%2Fruby%2Fmessage.c;h=6ea82afa20c5071086883b437054d80613e7a45d;hp=c55cf6e20d11b8faf3e10d979ad43a79952499db;hb=49d630d0f389e0bfb08a83178582f4a38f1ec664;hpb=c8539d5e9248f08f417165e765814a1ed3d777e1 diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c index c55cf6e2..6ea82afa 100644 --- a/bindings/ruby/message.c +++ b/bindings/ruby/message.c @@ -137,13 +137,18 @@ VALUE notmuch_rb_message_get_flag (VALUE self, VALUE flagv) { notmuch_message_t *message; + notmuch_bool_t is_set; + notmuch_status_t status; Data_Get_Notmuch_Message (self, message); if (!FIXNUM_P (flagv)) rb_raise (rb_eTypeError, "Flag not a Fixnum"); - return notmuch_message_get_flag (message, FIX2INT (flagv)) ? Qtrue : Qfalse; + status = notmuch_message_get_flag_st (message, FIX2INT (flagv), &is_set); + notmuch_rb_status_raise (status); + + return is_set ? Qtrue : Qfalse; } /*