aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-08 09:37:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-08 09:40:58 +0000
commitf8d478e0e274ea05882d0b3de1dbe4dcdbce0d64 (patch)
treec9b7bee9b54590c9f675398f669938209def4f78 /ruby
parente1b0751bc45a46bd2007338036fe3deee921eaf3 (diff)
downloadpaludis-f8d478e0e274ea05882d0b3de1dbe4dcdbce0d64.tar.gz
paludis-f8d478e0e274ea05882d0b3de1dbe4dcdbce0d64.tar.xz
Don't rely upon bind discarding args
Diffstat (limited to 'ruby')
-rw-r--r--ruby/action.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/ruby/action.cc b/ruby/action.cc
index 5d525f22b..3876b00df 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
* Copyright (c) 2007 Richard Brown
*
* This file is part of the Paludis package manager. Paludis is free software;
@@ -21,7 +21,6 @@
#include <paludis_ruby.hh>
#include <paludis/action.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/return_literal_function.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/standard_output_manager.hh>
#include <ruby.h>
@@ -52,6 +51,11 @@ namespace
static VALUE c_pretend_fetch_action;
+ WantPhase want_all_phases(const std::string &)
+ {
+ return wp_yes;
+ }
+
const FetchActionOptions
value_to_fetch_action_options(VALUE v)
{
@@ -293,7 +297,7 @@ namespace
n::ignore_unfetched() = false,
n::make_output_manager() = &make_standard_output_manager,
n::safe_resume() = v_safe_resume,
- n::want_phase() = std::bind(return_literal_function(wp_yes))
+ n::want_phase() = &want_all_phases
));
VALUE tdata(Data_Wrap_Struct(self, 0, &Common<FetchActionOptions>::free, ptr));
@@ -506,11 +510,6 @@ namespace
}
};
- WantPhase want_all_phases(const std::string &)
- {
- return wp_yes;
- }
-
void cannot_perform_uninstall(const std::shared_ptr<const PackageID> & id, const UninstallActionOptions &)
{
throw InternalError(PALUDIS_HERE, "Can't uninstall '" + stringify(*id) + "'");
@@ -530,15 +529,12 @@ namespace
InstallActionOptions * ptr(0);
try
{
- bool v_no_config_protect;
std::shared_ptr<Repository> v_destination;
if (1 == argc && rb_obj_is_kind_of(argv[0], rb_cHash))
{
if (Qnil == rb_hash_aref(argv[0], ID2SYM(rb_intern("destination"))))
rb_raise(rb_eArgError, "Missing Parameter: destination");
- v_no_config_protect =
- value_to_bool(rb_hash_aref(argv[0], ID2SYM(rb_intern("no_config_protect"))));
v_destination = value_to_repository(rb_hash_aref(argv[0], ID2SYM(rb_intern("destination"))));
}
else if (1 == argc)