aboutsummaryrefslogtreecommitdiff
path: root/ruby/metadata_key.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-07 21:28:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-07 21:28:26 +0000
commite15f518956383d4dc22bee5c13939f8de247a46d (patch)
treed1760116d2e5e29a7f47c3504319d13bd3e8f48a /ruby/metadata_key.cc
parent8294cd0acad913897cb79aba7d94144254fdb4f3 (diff)
downloadpaludis-e15f518956383d4dc22bee5c13939f8de247a46d.tar.gz
paludis-e15f518956383d4dc22bee5c13939f8de247a46d.tar.xz
Add Map<string, string> keys
Diffstat (limited to 'ruby/metadata_key.cc')
-rw-r--r--ruby/metadata_key.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index 313bde609..c956928e1 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -45,6 +45,7 @@ namespace
static VALUE c_metadata_repository_mask_info_key;
static VALUE c_metadata_keyword_name_set_key;
static VALUE c_metadata_string_set_key;
+ static VALUE c_metadata_string_string_map_key;
static VALUE c_metadata_string_sequence_key;
static VALUE c_metadata_package_id_sequence_key;
static VALUE c_metadata_fsentry_key;
@@ -182,6 +183,12 @@ namespace
new std::shared_ptr<const MetadataKey>(mm));
}
+ void visit(const MetadataCollectionKey<Map<std::string, std::string> > &)
+ {
+ value = Data_Wrap_Struct(c_metadata_string_string_map_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
+ new std::shared_ptr<const MetadataKey>(mm));
+ }
+
void visit(const MetadataCollectionKey<Sequence<std::string> > &)
{
value = Data_Wrap_Struct(c_metadata_string_sequence_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
@@ -772,6 +779,13 @@ namespace
rb_define_method(c_metadata_string_set_key, "value", RUBY_FUNC_CAST((&SetValue<Set<std::string> >::fetch)), 0);
/*
+ * Document-class: Paludis::MetadataStringStringMapKey
+ *
+ * Metadata class for String to String maps.
+ */
+ c_metadata_string_string_map_key = rb_define_class_under(paludis_module(), "MetadataStringStringMapKey", c_metadata_key);
+
+ /*
* Document-class: Paludis::MetadataStringSequenceKey
*
* Metadata class for String sequences.