aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-28 10:23:45 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-28 10:23:45 +0000
commitcf4a665c98457f16eff4d9360ca840a907351e8a (patch)
tree12c6b7dc9d02853a94147f5f6b86e85b4988886f /ruby
parentc0227237033d48136df4e08209fbf03afd08c293 (diff)
downloadpaludis-cf4a665c98457f16eff4d9360ca840a907351e8a.tar.gz
paludis-cf4a665c98457f16eff4d9360ca840a907351e8a.tar.xz
Fix 3.4, 4.3, icc compiles
Diffstat (limited to 'ruby')
-rw-r--r--ruby/action.cc2
-rw-r--r--ruby/dep_spec.cc24
2 files changed, 14 insertions, 12 deletions
diff --git a/ruby/action.cc b/ruby/action.cc
index ebc50a1..d7f481e 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -58,7 +58,7 @@ namespace
static VALUE c_pretend_action;
- const bool
+ bool
value_to_bool(VALUE v)
{
if (Qfalse == v || Qnil == v)
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index eb3bbcb..d289873 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -274,9 +274,11 @@ namespace
tr1::shared_ptr<typename H_::ConstItem> result;
tr1::function<void (const tr1::shared_ptr<ConstAcceptInterface<H_> > &)> adder;
- ValueToTree(VALUE val) :
- adder(tr1::bind(&ValueToTree<H_>::set_result, this, tr1::placeholders::_1))
+ ValueToTree(VALUE val)
{
+ using namespace tr1::placeholders;
+ adder = tr1::bind(tr1::mem_fn(&ValueToTree<H_>::set_result), this, _1);
+
tr1::shared_ptr<WrappedSpecBase> * p;
Data_Get_Struct(val, tr1::shared_ptr<WrappedSpecBase>, p);
(*p)->accept(*this);
@@ -298,7 +300,7 @@ namespace
adder(a);
Save<tr1::function<void (const tr1::shared_ptr<ConstAcceptInterface<H_> > &)> > s(
- &adder, tr1::bind(&ConstTreeSequence<H_, T_>::add, a, _1));
+ &adder, tr1::bind(tr1::mem_fn(&ConstTreeSequence<H_, T_>::add), a.get(), _1));
std::for_each(indirect_iterator(second_iterator(item.children()->begin())),
indirect_iterator(second_iterator(item.children()->end())),
accept_visitor(*this));
@@ -1226,15 +1228,15 @@ paludis::ruby::uri_label_to_value(const tr1::shared_ptr<const URILabel> & m)
}
}
-template VALUE dep_tree_to_value <SetSpecTree> (const tr1::shared_ptr<const SetSpecTree::ConstItem> &);
-template VALUE dep_tree_to_value <DependencySpecTree> (const tr1::shared_ptr<const DependencySpecTree::ConstItem> &);
-template VALUE dep_tree_to_value <FetchableURISpecTree> (const tr1::shared_ptr<const FetchableURISpecTree::ConstItem> &);
-template VALUE dep_tree_to_value <SimpleURISpecTree> (const tr1::shared_ptr<const SimpleURISpecTree::ConstItem> &);
-template VALUE dep_tree_to_value <RestrictSpecTree> (const tr1::shared_ptr<const RestrictSpecTree::ConstItem> &);
-template VALUE dep_tree_to_value <ProvideSpecTree> (const tr1::shared_ptr<const ProvideSpecTree::ConstItem> &);
-template VALUE dep_tree_to_value <LicenseSpecTree> (const tr1::shared_ptr<const LicenseSpecTree::ConstItem> &);
+template VALUE paludis::ruby::dep_tree_to_value<SetSpecTree> (const tr1::shared_ptr<const SetSpecTree::ConstItem> &);
+template VALUE paludis::ruby::dep_tree_to_value<DependencySpecTree> (const tr1::shared_ptr<const DependencySpecTree::ConstItem> &);
+template VALUE paludis::ruby::dep_tree_to_value<FetchableURISpecTree> (const tr1::shared_ptr<const FetchableURISpecTree::ConstItem> &);
+template VALUE paludis::ruby::dep_tree_to_value<SimpleURISpecTree> (const tr1::shared_ptr<const SimpleURISpecTree::ConstItem> &);
+template VALUE paludis::ruby::dep_tree_to_value<RestrictSpecTree> (const tr1::shared_ptr<const RestrictSpecTree::ConstItem> &);
+template VALUE paludis::ruby::dep_tree_to_value<ProvideSpecTree> (const tr1::shared_ptr<const ProvideSpecTree::ConstItem> &);
+template VALUE paludis::ruby::dep_tree_to_value<LicenseSpecTree> (const tr1::shared_ptr<const LicenseSpecTree::ConstItem> &);
-template tr1::shared_ptr<const SetSpecTree::ConstItem> value_to_dep_tree <SetSpecTree> (VALUE);
+template tr1::shared_ptr<const SetSpecTree::ConstItem> paludis::ruby::value_to_dep_tree <SetSpecTree> (VALUE);
RegisterRubyClass::Register paludis_ruby_register_dep_spec PALUDIS_ATTRIBUTE((used))
(&do_register_dep_spec);