Glib::Object::Introspection->convert_flags_to_sv and Glib::Object::Introspection->convert_sv_to_flags.