aboutsummaryrefslogtreecommitdiff
path: root/python/choices.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-09 21:14:17 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-09 21:14:17 +0100
commit5dbb7636dd880314d5b03379ebfd960b469ee6e9 (patch)
tree6a9a062efbf6aa03dcbdc92b6abf156108904ea2 /python/choices.cc
parentc9137efc3ef08b5c52f775dd853c1c675e80cc64 (diff)
downloadpaludis-5dbb7636dd880314d5b03379ebfd960b469ee6e9.tar.gz
paludis-5dbb7636dd880314d5b03379ebfd960b469ee6e9.tar.xz
Replace Validated with WrappedValue
Slightly cleaner code, and will allow us to pass in additional validation options.
Diffstat (limited to 'python/choices.cc')
-rw-r--r--python/choices.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/python/choices.cc b/python/choices.cc
index 6a174b191..181b5801b 100644
--- a/python/choices.cc
+++ b/python/choices.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -19,9 +19,8 @@
#include <python/paludis_python.hh>
#include <python/exception.hh>
-#include <python/validated.hh>
+#include <python/wrapped_value.hh>
-#include <paludis/util/validated.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/choice.hh>
@@ -133,7 +132,7 @@ void expose_choices()
"Thrown if an invalid value is assigned to a ChoiceNameWithPrefix.");
register_shared_ptrs_to_python<ChoiceNameWithPrefix>();
- class_validated<ChoiceNameWithPrefix>
+ class_wrapped_value<ChoiceNameWithPrefix>
(
"ChoiceNameWithPrefix",
"A choice name, including prefix and delim."
@@ -144,7 +143,7 @@ void expose_choices()
"Thrown if an invalid value is assigned to a ChoicePrefixName.");
register_shared_ptrs_to_python<ChoicePrefixName>();
- class_validated<ChoicePrefixName>
+ class_wrapped_value<ChoicePrefixName>
(
"ChoicePrefixName",
"A choice prefix name."
@@ -155,7 +154,7 @@ void expose_choices()
"Thrown if an invalid value is assigned to an UnprefixedChoiceName.");
register_shared_ptrs_to_python<UnprefixedChoiceName>();
- class_validated<UnprefixedChoiceName>
+ class_wrapped_value<UnprefixedChoiceName>
(
"UnprefixedChoiceName",
"A choice name, without prefix."