diff options
author | 2011-03-29 14:43:22 +0100 | |
---|---|---|
committer | 2011-04-04 08:32:59 +0100 | |
commit | 52a4c781098800f3b2831134f5e94434729c46a5 (patch) | |
tree | 55499ba5305132e315d51633332ee18289df5adb | |
parent | bc262ad74eb8d80eb979a5c5591b222d5fc1eb36 (diff) | |
download | paludis-52a4c781098800f3b2831134f5e94434729c46a5.tar.gz paludis-52a4c781098800f3b2831134f5e94434729c46a5.tar.xz |
installable to path to requirements
-rw-r--r-- | doc/api/cplusplus/examples/example_dep_spec.cc | 6 | ||||
-rw-r--r-- | paludis/dep_spec-fwd.hh | 1 | ||||
-rw-r--r-- | paludis/dep_spec.cc | 6 | ||||
-rw-r--r-- | paludis/dep_spec.hh | 19 | ||||
-rw-r--r-- | paludis/dep_spec_data.hh | 7 | ||||
-rw-r--r-- | paludis/match_package.cc | 6 | ||||
-rw-r--r-- | paludis/package_dep_spec_constraint-fwd.hh | 3 | ||||
-rw-r--r-- | paludis/package_dep_spec_constraint.cc | 25 | ||||
-rw-r--r-- | paludis/package_dep_spec_constraint.hh | 25 | ||||
-rw-r--r-- | paludis/package_dep_spec_properties.cc | 2 | ||||
-rw-r--r-- | paludis/partially_made_package_dep_spec.cc | 18 | ||||
-rw-r--r-- | paludis/partially_made_package_dep_spec.hh | 4 | ||||
-rw-r--r-- | paludis/user_dep_spec.cc | 8 | ||||
-rw-r--r-- | paludis/user_dep_spec_TEST.cc | 8 | ||||
-rw-r--r-- | python/package_dep_spec_constraint.cc | 19 | ||||
-rw-r--r-- | ruby/dep_spec.cc | 20 | ||||
-rw-r--r-- | ruby/dep_spec_TEST.rb | 13 | ||||
-rw-r--r-- | ruby/package_dep_spec_constraint.cc | 46 | ||||
-rw-r--r-- | src/clients/cave/cmd_print_spec.cc | 5 |
19 files changed, 167 insertions, 74 deletions
diff --git a/doc/api/cplusplus/examples/example_dep_spec.cc b/doc/api/cplusplus/examples/example_dep_spec.cc index d8256a55c..6a7fd690d 100644 --- a/doc/api/cplusplus/examples/example_dep_spec.cc +++ b/doc/api/cplusplus/examples/example_dep_spec.cc @@ -113,10 +113,10 @@ int main(int argc, char * argv[]) cout << " " << left << setw(24) << "Installed at path:" << " " << spec.installed_at_path_constraint()->path() << endl; - if (spec.installable_to_path_ptr()) + if (spec.installable_to_path_constraint()) cout << " " << left << setw(24) << "Installable to path:" << " " << - spec.installable_to_path_ptr()->path() << ", " << - spec.installable_to_path_ptr()->include_masked() << endl; + spec.installable_to_path_constraint()->path() << ", " << + spec.installable_to_path_constraint()->include_masked() << endl; if (spec.installable_to_repository_ptr()) cout << " " << left << setw(24) << "Installable to repository:" << " " << diff --git a/paludis/dep_spec-fwd.hh b/paludis/dep_spec-fwd.hh index 51128b675..69eb4e01b 100644 --- a/paludis/dep_spec-fwd.hh +++ b/paludis/dep_spec-fwd.hh @@ -65,7 +65,6 @@ namespace paludis typedef LabelsDepSpec<DependenciesLabel> DependenciesLabelsDepSpec; struct InstallableToRepository; - struct InstallableToPath; /** * A PlainTextDepSpec can be written to an ostream. diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc index 8d254ea80..3428c81c0 100644 --- a/paludis/dep_spec.cc +++ b/paludis/dep_spec.cc @@ -602,10 +602,10 @@ PackageDepSpec::installed_at_path_constraint() const return _imp->data->installed_at_path_constraint(); } -std::shared_ptr<const InstallableToPath> -PackageDepSpec::installable_to_path_ptr() const +const std::shared_ptr<const InstallableToPathConstraint> +PackageDepSpec::installable_to_path_constraint() const { - return _imp->data->installable_to_path_ptr(); + return _imp->data->installable_to_path_constraint(); } std::shared_ptr<const AdditionalPackageDepSpecRequirements> diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh index 5058aa677..1b6bffd52 100644 --- a/paludis/dep_spec.hh +++ b/paludis/dep_spec.hh @@ -285,18 +285,6 @@ namespace paludis }; /** - * Data for PackageDepSpec.installable_to_path_ptr() etc. - * - * \ingroup g_dep_spec - * \since 0.32 - */ - struct InstallableToPath - { - NamedValue<n::include_masked, bool> include_masked; - NamedValue<n::path, FSPath> path; - }; - - /** * A PackageDepSpec represents a package name (for example, * 'app-editors/vim'), possibly with associated version and SLOT * restrictions. @@ -416,11 +404,12 @@ namespace paludis const std::shared_ptr<const InstalledAtPathConstraint> installed_at_path_constraint() const; /** - * Fetch the installable-to-path requirement (may be a zero pointer). + * Fetch the single InstallableToPathConstraint, if we have one, or + * a null pointer otherwise. * - * \since 0.32 + * \since 0.61 */ - std::shared_ptr<const InstallableToPath> installable_to_path_ptr() const; + const std::shared_ptr<const InstallableToPathConstraint> installable_to_path_constraint() const; /** * Fetch any additional requirements (may be a zero pointer). diff --git a/paludis/dep_spec_data.hh b/paludis/dep_spec_data.hh index b94d5df91..1f03c0d5b 100644 --- a/paludis/dep_spec_data.hh +++ b/paludis/dep_spec_data.hh @@ -185,11 +185,12 @@ namespace paludis virtual const std::shared_ptr<const InstalledAtPathConstraint> installed_at_path_constraint() const = 0; /** - * Fetch the installable-to-path requirement (may be a zero pointer). + * Fetch the single InstallableToPathConstraint, if we have one, or + * a null pointer otherwise. * - * \since 0.32 + * \since 0.61 */ - virtual std::shared_ptr<const InstallableToPath> installable_to_path_ptr() const = 0; + virtual const std::shared_ptr<const InstallableToPathConstraint> installable_to_path_constraint() const = 0; /** * Fetch the additional requirements (may be a zero pointer). diff --git a/paludis/match_package.cc b/paludis/match_package.cc index 5c77b1dca..199d75c1b 100644 --- a/paludis/match_package.cc +++ b/paludis/match_package.cc @@ -165,11 +165,11 @@ paludis::match_package_with_maybe_changes( return false; } - if (spec.installable_to_path_ptr()) + if (spec.installable_to_path_constraint()) { if (! id->supports_action(SupportsActionTest<InstallAction>())) return false; - if (! spec.installable_to_path_ptr()->include_masked()) + if (! spec.installable_to_path_constraint()->include_masked()) if (id->masked()) return false; @@ -181,7 +181,7 @@ paludis::match_package_with_maybe_changes( continue; if (! (*d)->installed_root_key()) continue; - if ((*d)->installed_root_key()->value() != spec.installable_to_path_ptr()->path()) + if ((*d)->installed_root_key()->value() != spec.installable_to_path_constraint()->path()) continue; if (! (*d)->destination_interface()->is_suitable_destination_for(id)) continue; diff --git a/paludis/package_dep_spec_constraint-fwd.hh b/paludis/package_dep_spec_constraint-fwd.hh index e395b31bd..3f55dcbbc 100644 --- a/paludis/package_dep_spec_constraint-fwd.hh +++ b/paludis/package_dep_spec_constraint-fwd.hh @@ -43,6 +43,9 @@ namespace paludis class InstalledAtPathConstraint; typedef Pool<InstalledAtPathConstraint> InstalledAtPathConstraintPool; + + class InstallableToPathConstraint; + typedef Pool<InstallableToPathConstraint> InstallableToPathConstraintPool; } #endif diff --git a/paludis/package_dep_spec_constraint.cc b/paludis/package_dep_spec_constraint.cc index fe1d9cac3..a597a88ee 100644 --- a/paludis/package_dep_spec_constraint.cc +++ b/paludis/package_dep_spec_constraint.cc @@ -134,3 +134,28 @@ template class Singleton<Pool<InstalledAtPathConstraint> >; template const std::shared_ptr<const InstalledAtPathConstraint> Pool<InstalledAtPathConstraint>::create( const FSPath &) const; +InstallableToPathConstraint::InstallableToPathConstraint(const FSPath & n, const bool i) : + _path(n), + _include_masked(i) +{ +} + +InstallableToPathConstraint::~InstallableToPathConstraint() = default; + +const FSPath +InstallableToPathConstraint::path() const +{ + return _path; +} + +bool +InstallableToPathConstraint::include_masked() const +{ + return _include_masked; +} + +template class Pool<InstallableToPathConstraint>; +template class Singleton<Pool<InstallableToPathConstraint> >; +template const std::shared_ptr<const InstallableToPathConstraint> Pool<InstallableToPathConstraint>::create( + const FSPath &, const bool & ...) const; + diff --git a/paludis/package_dep_spec_constraint.hh b/paludis/package_dep_spec_constraint.hh index 88eae4559..0843a0130 100644 --- a/paludis/package_dep_spec_constraint.hh +++ b/paludis/package_dep_spec_constraint.hh @@ -38,7 +38,8 @@ namespace paludis CategoryNamePartConstraint, InRepositoryConstraint, FromRepositoryConstraint, - InstalledAtPathConstraint + InstalledAtPathConstraint, + InstallableToPathConstraint >::Type> { public: @@ -159,12 +160,34 @@ namespace paludis const FSPath path() const PALUDIS_ATTRIBUTE((warn_unused_result)); }; + class PALUDIS_VISIBLE InstallableToPathConstraint : + public PackageDepSpecConstraint, + public ImplementAcceptMethods<PackageDepSpecConstraint, InstallableToPathConstraint> + { + friend class Pool<InstallableToPathConstraint>; + + private: + FSPath _path; + bool _include_masked; + + InstallableToPathConstraint(const FSPath &, const bool); + + InstallableToPathConstraint(const InstallableToPathConstraint &) = delete; + + public: + ~InstallableToPathConstraint(); + + const FSPath path() const PALUDIS_ATTRIBUTE((warn_unused_result)); + bool include_masked() const PALUDIS_ATTRIBUTE((warn_unused_result)); + }; + extern template class Pool<NameConstraint>; extern template class Pool<PackageNamePartConstraint>; extern template class Pool<CategoryNamePartConstraint>; extern template class Pool<InRepositoryConstraint>; extern template class Pool<FromRepositoryConstraint>; extern template class Pool<InstalledAtPathConstraint>; + extern template class Pool<InstallableToPathConstraint>; } #endif diff --git a/paludis/package_dep_spec_properties.cc b/paludis/package_dep_spec_properties.cc index 394395b48..11d5717b4 100644 --- a/paludis/package_dep_spec_properties.cc +++ b/paludis/package_dep_spec_properties.cc @@ -45,7 +45,7 @@ paludis::package_dep_spec_has_properties(const PackageDepSpec & spec, const Pack result = result && check(bool(spec.category_name_part_constraint()), properties.has_category_name_part()); result = result && check(bool(spec.from_repository_constraint()), properties.has_from_repository()); result = result && check(bool(spec.in_repository_constraint()), properties.has_in_repository()); - result = result && check(bool(spec.installable_to_path_ptr()), properties.has_installable_to_path()); + result = result && check(bool(spec.installable_to_path_constraint()), properties.has_installable_to_path()); result = result && check(bool(spec.installable_to_repository_ptr()), properties.has_installable_to_repository()); result = result && check(bool(spec.installed_at_path_constraint()), properties.has_installed_at_path()); result = result && check(bool(spec.package_name_constraint()), properties.has_package()); diff --git a/paludis/partially_made_package_dep_spec.cc b/paludis/partially_made_package_dep_spec.cc index 5454f00c3..5d31cb426 100644 --- a/paludis/partially_made_package_dep_spec.cc +++ b/paludis/partially_made_package_dep_spec.cc @@ -58,7 +58,7 @@ namespace std::shared_ptr<const FromRepositoryConstraint> from_repository; std::shared_ptr<const InstallableToRepository> installable_to_repository; std::shared_ptr<const InstalledAtPathConstraint> installed_at_path; - std::shared_ptr<const InstallableToPath> installable_to_path; + std::shared_ptr<const InstallableToPathConstraint> installable_to_path; std::shared_ptr<AdditionalPackageDepSpecRequirements> additional_requirements; PartiallyMadePackageDepSpecOptions options_for_partially_made_package_dep_spec_v; @@ -81,7 +81,7 @@ namespace from_repository(other.from_repository_constraint()), installable_to_repository(other.installable_to_repository_ptr()), installed_at_path(other.installed_at_path_constraint()), - installable_to_path(other.installable_to_path_ptr()), + installable_to_path(other.installable_to_path_constraint()), additional_requirements(other.additional_requirements_ptr() ? new AdditionalPackageDepSpecRequirements : 0), options_for_partially_made_package_dep_spec_v(other.options_for_partially_made_package_dep_spec()) { @@ -197,17 +197,17 @@ namespace right.append(stringify(installable_to_repository_ptr()->repository()) + "?"); } - if (installable_to_path_ptr()) + if (installable_to_path_constraint()) { if (! right.empty()) { need_arrow = true; right.append("->"); } - if (installable_to_path_ptr()->include_masked()) - right.append(stringify(installable_to_path_ptr()->path()) + "??"); + if (installable_to_path_constraint()->include_masked()) + right.append(stringify(installable_to_path_constraint()->path()) + "??"); else - right.append(stringify(installable_to_path_ptr()->path()) + "?"); + right.append(stringify(installable_to_path_constraint()->path()) + "?"); } if (need_arrow || ((! left.empty()) && (! right.empty()))) @@ -328,7 +328,7 @@ namespace return installed_at_path; } - virtual std::shared_ptr<const InstallableToPath> installable_to_path_ptr() const + virtual const std::shared_ptr<const InstallableToPathConstraint> installable_to_path_constraint() const { return installable_to_path; } @@ -473,9 +473,9 @@ PartiallyMadePackageDepSpec::clear_installed_at_path() } PartiallyMadePackageDepSpec & -PartiallyMadePackageDepSpec::installable_to_path(const InstallableToPath & s) +PartiallyMadePackageDepSpec::installable_to_path(const FSPath & s, const bool i) { - _imp->data->installable_to_path = std::make_shared<InstallableToPath>(s); + _imp->data->installable_to_path = InstallableToPathConstraintPool::get_instance()->create(s, i); return *this; } diff --git a/paludis/partially_made_package_dep_spec.hh b/paludis/partially_made_package_dep_spec.hh index 4f08730f6..b982a1fe2 100644 --- a/paludis/partially_made_package_dep_spec.hh +++ b/paludis/partially_made_package_dep_spec.hh @@ -129,9 +129,9 @@ namespace paludis /** * Set our installable-to-path requirement, return ourself. * - * \since 0.32 + * \since 0.61 */ - PartiallyMadePackageDepSpec & installable_to_path(const InstallableToPath &); + PartiallyMadePackageDepSpec & installable_to_path(const FSPath &, const bool include_masked); /** * Clear our installable-to-path requirement, return ourself. diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc index 0e10a2fa2..f18bfcb6f 100644 --- a/paludis/user_dep_spec.cc +++ b/paludis/user_dep_spec.cc @@ -261,13 +261,9 @@ namespace if ('?' == req.at(req.length() - 1)) { if (req.length() >= 2 && '?' == req.at(req.length() - 2)) - reqs.installable_to_path(make_named_values<InstallableToPath>( - n::include_masked() = true, - n::path() = FSPath(req.substr(0, req.length() - 2)))); + reqs.installable_to_path(FSPath(req.substr(0, req.length() - 2)), true); else - reqs.installable_to_path(make_named_values<InstallableToPath>( - n::include_masked() = false, - n::path() = FSPath(req.substr(0, req.length() - 1)))); + reqs.installable_to_path(FSPath(req.substr(0, req.length() - 1)), false); } else reqs.installed_at_path(FSPath(req)); diff --git a/paludis/user_dep_spec_TEST.cc b/paludis/user_dep_spec_TEST.cc index 73461f001..b8a69c35f 100644 --- a/paludis/user_dep_spec_TEST.cc +++ b/paludis/user_dep_spec_TEST.cc @@ -169,12 +169,12 @@ UserDepSpecTest::check_spec( } if (installable_to_path_f.empty()) - EXPECT_TRUE(! spec.installable_to_path_ptr()); + EXPECT_TRUE(! spec.installable_to_path_constraint()); else { - EXPECT_TRUE(bool(spec.installable_to_path_ptr())); - EXPECT_EQ(installable_to_path_f, stringify(spec.installable_to_path_ptr()->path())); - EXPECT_EQ(installable_to_path_s, spec.installable_to_path_ptr()->include_masked()); + EXPECT_TRUE(bool(spec.installable_to_path_constraint())); + EXPECT_EQ(installable_to_path_f, stringify(spec.installable_to_path_constraint()->path())); + EXPECT_EQ(installable_to_path_s, spec.installable_to_path_constraint()->include_masked()); } } diff --git a/python/package_dep_spec_constraint.cc b/python/package_dep_spec_constraint.cc index 2b17ae194..2d42cb5f1 100644 --- a/python/package_dep_spec_constraint.cc +++ b/python/package_dep_spec_constraint.cc @@ -148,5 +148,24 @@ void expose_package_dep_spec_constraint() "[RO] The ::/ path in question" ) ; + + /** + * InstallableToPathConstraint + */ + class_package_dep_spec_constraint<InstallableToPathConstraint> + ( + "InstalledableToPathConstraint", + "A ::/? constraint for a PackageDepSpec.", + bp::no_init + ) + + .add_property("path", &InstallableToPathConstraint::path, + "[RO] The ::/? path in question" + ) + + .add_property("include_masked", &InstallableToPathConstraint::include_masked, + "[RO] Whether to include masked, as per ::/??" + ) + ; } diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc index 7c13eabdd..aa377fc52 100644 --- a/ruby/dep_spec.cc +++ b/ruby/dep_spec.cc @@ -743,24 +743,20 @@ namespace /* * call-seq: - * installable_to_path -> Hash or Nil + * installable_to_path_constraint -> + * InstallableToPathConstraintPool or Nil * - * Fetch the installable-to-path requirement. + * Fetch the installable-to-path constraint. */ VALUE - package_dep_spec_installable_to_path(VALUE self) + package_dep_spec_installable_to_path_constraint(VALUE self) { std::shared_ptr<WrappedSpecBase> * ptr; Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr); - std::shared_ptr<const InstallableToPath> i2p(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_ptr()); - if (! i2p) + if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint())) return Qnil; - VALUE result(rb_hash_new()); - rb_hash_aset(result, ID2SYM(rb_intern("path")), - rb_str_new2(stringify(i2p->path()).c_str())); - rb_hash_aset(result, ID2SYM(rb_intern("include_masked?")), - i2p->include_masked() ? Qtrue : Qfalse); - return result; + return package_dep_spec_constraint_to_value( + std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint()); } /* @@ -1118,7 +1114,7 @@ namespace rb_define_method(c_package_dep_spec, "from_repository_constraint", RUBY_FUNC_CAST(&package_dep_spec_from_repository_constraint), 0); rb_define_method(c_package_dep_spec, "installable_to_repository", RUBY_FUNC_CAST(&package_dep_spec_installable_to_repository), 0); rb_define_method(c_package_dep_spec, "installed_at_path_constraint", RUBY_FUNC_CAST(&package_dep_spec_installed_at_path_constraint), 0); - rb_define_method(c_package_dep_spec, "installable_to_path", RUBY_FUNC_CAST(&package_dep_spec_installable_to_path), 0); + rb_define_method(c_package_dep_spec, "installable_to_path_constraint", RUBY_FUNC_CAST(&package_dep_spec_installable_to_path_constraint), 0); rb_define_method(c_package_dep_spec, "version_requirements", RUBY_FUNC_CAST(&package_dep_spec_version_requirements_ptr), 0); rb_define_method(c_package_dep_spec, "version_requirements_mode", RUBY_FUNC_CAST(&package_dep_spec_version_requirements_mode), 0); #ifdef CIARANM_REMOVED_THIS diff --git a/ruby/dep_spec_TEST.rb b/ruby/dep_spec_TEST.rb index 565968e93..80e32f351 100644 --- a/ruby/dep_spec_TEST.rb +++ b/ruby/dep_spec_TEST.rb @@ -182,13 +182,12 @@ module Paludis end def test_installable_to_path - assert_nil pda.installable_to_path - assert_nil pdb.installable_to_path - assert_nil pdc.installable_to_path - assert_kind_of Hash, pdd.installable_to_path - assert_equal "/", pdd.installable_to_path[:path] - assert pdd.installable_to_path[:include_masked?] - assert_nil pde.installable_to_path + assert_nil pda.installable_to_path_constraint + assert_nil pdb.installable_to_path_constraint + assert_nil pdc.installable_to_path_constraint + assert_equal "/", pdd.installable_to_path_constraint.path + assert pdd.installable_to_path_constraint.include_masked? + assert_nil pde.installable_to_path_constraint end def test_package_name_part diff --git a/ruby/package_dep_spec_constraint.cc b/ruby/package_dep_spec_constraint.cc index 10e6509fc..360caab8e 100644 --- a/ruby/package_dep_spec_constraint.cc +++ b/ruby/package_dep_spec_constraint.cc @@ -37,6 +37,7 @@ namespace static VALUE c_in_repository_constraint; static VALUE c_from_repository_constraint; static VALUE c_installed_at_path_constraint; + static VALUE c_installable_to_path_constraint; struct V { @@ -83,6 +84,12 @@ namespace value = Data_Wrap_Struct(c_installed_at_path_constraint, 0, &Common<std::shared_ptr<const PackageDepSpecConstraint> >::free, new std::shared_ptr<const PackageDepSpecConstraint>(mm)); } + + void visit(const InstallableToPathConstraint &) + { + value = Data_Wrap_Struct(c_installable_to_path_constraint, 0, &Common<std::shared_ptr<const PackageDepSpecConstraint> >::free, + new std::shared_ptr<const PackageDepSpecConstraint>(mm)); + } }; /* @@ -163,6 +170,32 @@ namespace return rb_str_new2(stringify((std::static_pointer_cast<const InstalledAtPathConstraint>(*ptr))->path()).c_str()); } + /* + * Document-method: path + * + * The path constraint. + */ + static VALUE + installable_to_path_constraint_path(VALUE self) + { + std::shared_ptr<const PackageDepSpecConstraint> * ptr; + Data_Get_Struct(self, std::shared_ptr<const PackageDepSpecConstraint>, ptr); + return rb_str_new2(stringify((std::static_pointer_cast<const InstallableToPathConstraint>(*ptr))->path()).c_str()); + } + + /* + * Document-method: include_masked? + * + * The include-masked constraint. + */ + static VALUE + installable_to_path_constraint_include_masked(VALUE self) + { + std::shared_ptr<const PackageDepSpecConstraint> * ptr; + Data_Get_Struct(self, std::shared_ptr<const PackageDepSpecConstraint>, ptr); + return (std::static_pointer_cast<const InstallableToPathConstraint>(*ptr))->include_masked() ? Qtrue : Qfalse; + } + void do_register_package_dep_spec_constraint() { /* @@ -237,6 +270,19 @@ namespace rb_funcall(c_installed_at_path_constraint, rb_intern("private_class_method"), 1, rb_str_new2("new")); rb_define_method(c_installed_at_path_constraint, "path", RUBY_FUNC_CAST( &installed_at_path_constraint_path), 0); + + /* + * Document-class: Paludis::InstallableToPathConstraint + * + * Represents a ::/ path constraint in a PackageDepSpec. + */ + c_installable_to_path_constraint = rb_define_class_under( + paludis_module(), "InRepositoryConstraint", c_package_dep_spec_constraint); + rb_funcall(c_installable_to_path_constraint, rb_intern("private_class_method"), 1, rb_str_new2("new")); + rb_define_method(c_installable_to_path_constraint, "path", RUBY_FUNC_CAST( + &installable_to_path_constraint_path), 0); + rb_define_method(c_installable_to_path_constraint, "include_masked?", RUBY_FUNC_CAST( + &installable_to_path_constraint_include_masked), 0); } } diff --git a/src/clients/cave/cmd_print_spec.cc b/src/clients/cave/cmd_print_spec.cc index 00124bda7..6bba880c0 100644 --- a/src/clients/cave/cmd_print_spec.cc +++ b/src/clients/cave/cmd_print_spec.cc @@ -195,10 +195,7 @@ namespace include_masked = true; } - s.installable_to_path(make_named_values<InstallableToPath>( - n::include_masked() = include_masked, - n::path() = FSPath(path) - )); + s.installable_to_path(FSPath(path), include_masked); } } |