X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Fdefs.h;h=46e2caf8a0ee54fbb08b4fbb9c850853e95a4809;hb=c84ccb70f3ed2b2228346499b5110311039a0ecf;hp=e95ea239b0cea8c222c71e72d6b225f75f371641;hpb=2e57ffb860f2ca986fcb60548e4907d6e8fa912a;p=notmuch diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h index e95ea239..46e2caf8 100644 --- a/bindings/ruby/defs.h +++ b/bindings/ruby/defs.h @@ -57,10 +57,9 @@ extern ID ID_db_mode; #define Data_Get_Notmuch_Object(obj, type, message, ptr) \ do { \ - Check_Type ((obj), T_DATA); \ - if (DATA_PTR ((obj)) == NULL) \ - rb_raise (rb_eRuntimeError, (message)); \ Data_Get_Struct ((obj), type, (ptr)); \ + if (!(ptr)) \ + rb_raise (rb_eRuntimeError, (message)); \ } while (0) #define Data_Get_Notmuch_Database(obj, ptr) \