aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-14 09:22:50 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-14 09:57:40 +0100
commitcabf80cc5dfeb84eef7c4d7784eee0dc87de6d5e (patch)
tree05a370d70ee2c8aee9d6bdf44a0a4f1a94dff5cc /ruby
parent81d87f2466fcccf199a0a7363062eab649acb87a (diff)
downloadpaludis-cabf80cc5dfeb84eef7c4d7784eee0dc87de6d5e.tar.gz
paludis-cabf80cc5dfeb84eef7c4d7784eee0dc87de6d5e.tar.xz
Maintainers as objects
Diffstat (limited to 'ruby')
-rw-r--r--ruby/metadata_key.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index b2bc74089..dba7cfae4 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -48,6 +48,7 @@ namespace
static VALUE c_metadata_package_id_sequence_key;
static VALUE c_metadata_fsentry_key;
static VALUE c_metadata_fsentry_sequence_key;
+ static VALUE c_metadata_maintainers_key;
static VALUE c_metadata_key_type;
static VALUE c_metadata_license_spec_tree_key;
static VALUE c_metadata_fetchable_uri_spec_tree_key;
@@ -186,6 +187,12 @@ namespace
new std::shared_ptr<const MetadataKey>(mm));
}
+ void visit(const MetadataCollectionKey<Maintainers> &)
+ {
+ value = Data_Wrap_Struct(c_metadata_maintainers_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
+ new std::shared_ptr<const MetadataKey>(mm));
+ }
+
void visit(const MetadataCollectionKey<PackageIDSequence> &)
{
value = Data_Wrap_Struct(c_metadata_package_id_sequence_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
@@ -688,7 +695,15 @@ namespace
* Metadata class for filesystem sequences.
*/
c_metadata_fsentry_sequence_key = rb_define_class_under(paludis_module(), "MetadataFSPathSequenceKey", c_metadata_key);
- rb_define_method(c_metadata_fsentry_sequence_key, "parse_value", RUBY_FUNC_CAST((&SetValue<FSPathSequence>::fetch)), 0);
+ rb_define_method(c_metadata_fsentry_sequence_key, "parse_value", RUBY_FUNC_CAST((&SetValue<Maintainers>::fetch)), 0);
+
+ /*
+ * Document-class: Paludis::MetadataMaintainersKey
+ *
+ * Metadata class for maintainers.
+ */
+ c_metadata_maintainers_key = rb_define_class_under(paludis_module(), "MetadataMaintainersKey", c_metadata_key);
+ rb_define_method(c_metadata_maintainers_key, "parse_value", RUBY_FUNC_CAST((&SetValue<FSPathSequence>::fetch)), 0);
/*
* Document-class: Paludis::MetadataStringSetKey