aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:19:18 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:33:00 +0100
commit6d8fa49055b5c43117d98c020187be9bfa4fb2c6 (patch)
tree1f8d90310bbac90838dce4f082fd4c8fa4e04942 /ruby
parent508e7564e1d8d1de765d4d517bc899b7ef137716 (diff)
downloadpaludis-6d8fa49055b5c43117d98c020187be9bfa4fb2c6.tar.gz
paludis-6d8fa49055b5c43117d98c020187be9bfa4fb2c6.tar.xz
Use reqs to constraints
Diffstat (limited to 'ruby')
-rw-r--r--ruby/package_dep_spec_constraint.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/ruby/package_dep_spec_constraint.cc b/ruby/package_dep_spec_constraint.cc
index 4184b4f4d..e06e957f2 100644
--- a/ruby/package_dep_spec_constraint.cc
+++ b/ruby/package_dep_spec_constraint.cc
@@ -43,6 +43,7 @@ namespace
static VALUE c_any_slot_constraint;
static VALUE c_exact_slot_constraint;
static VALUE c_key_constraint;
+ static VALUE c_choice_constraint;
static VALUE c_key_constraint_operation;
@@ -127,6 +128,12 @@ namespace
value = Data_Wrap_Struct(c_key_constraint, 0, &Common<std::shared_ptr<const PackageDepSpecConstraint> >::free,
new std::shared_ptr<const PackageDepSpecConstraint>(mm));
}
+
+ void visit(const ChoiceConstraint &)
+ {
+ value = Data_Wrap_Struct(c_choice_constraint, 0, &Common<std::shared_ptr<const PackageDepSpecConstraint> >::free,
+ new std::shared_ptr<const PackageDepSpecConstraint>(mm));
+ }
};
/*
@@ -488,6 +495,15 @@ namespace
rb_define_const(c_key_constraint_operation, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
// cc_enum_special<paludis/package_dep_spec_constraint-se.hh, KeyConstraint, c_key_constraint_operation>
+
+ /*
+ * Document-class: Paludis::ChoiceConstraint
+ *
+ * Represents a [flag] constraint in a PackageDepSpec.
+ */
+ c_choice_constraint = rb_define_class_under(
+ paludis_module(), "KeyConstraint", c_package_dep_spec_constraint);
+ rb_funcall(c_choice_constraint, rb_intern("private_class_method"), 1, rb_str_new2("new"));
}
}