X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Fmessage.c;h=6ea82afa20c5071086883b437054d80613e7a45d;hb=49d630d0f389e0bfb08a83178582f4a38f1ec664;hp=c55cf6e20d11b8faf3e10d979ad43a79952499db;hpb=2f4beda434c59f9e2f5b7c32d26543bad7217ad4;p=notmuch 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; } /*