/** * call-seq: * mcn() -> string or nil * * Return the media catalogue number of the release, if present. * * Requires libdiscid >= 0.3. If not supported this method will always return +nil+. * * Returns +nil+ if no ID was yet read. */ static VALUE mb_discid_mcn(VALUE self) { #ifdef HAVE_DISCID_GET_MCN if (rb_iv_get(self, "@read") == Qfalse) return Qnil; else { DiscId *disc; Data_Get_Struct(self, DiscId, disc); return rb_str_new2(discid_get_mcn(disc)); } #else return Qnil; #endif }