aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-08-19 13:23:13 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-08-19 13:23:13 +0000
commit2fd676ba543e9ddd26b17f13561ff85b0fa95585 (patch)
tree0cfc039e014a0a02ea2e6a4c9c13c4a90786a65e
parent718b486fb11666c641ee16b24abe3e65a8a7a2a2 (diff)
downloadpaludis-2fd676ba543e9ddd26b17f13561ff85b0fa95585.tar.gz
paludis-2fd676ba543e9ddd26b17f13561ff85b0fa95585.tar.xz
(python) Fix some weird bug, probably boost-1.33.1 related.
-rw-r--r--python/mask.cc21
-rw-r--r--python/metadata_key.cc47
2 files changed, 35 insertions, 33 deletions
diff --git a/python/mask.cc b/python/mask.cc
index 1d0f168..f571a3c 100644
--- a/python/mask.cc
+++ b/python/mask.cc
@@ -304,6 +304,7 @@ void expose_mask()
* Mask
*/
MaskSptrToPython();
+ register_shared_ptrs_to_python<Mask>(rsp_non_const);
bp::class_<MaskWrapper, boost::noncopyable>
(
"Mask",
@@ -325,8 +326,8 @@ void expose_mask()
* UserMask
*/
bp::register_ptr_to_python<tr1::shared_ptr<const UserMask> >();
- bp::implicitly_convertible<tr1::shared_ptr<const UserMaskWrapper>, tr1::shared_ptr<const Mask> >();
- bp::class_<UserMaskWrapper, tr1::shared_ptr<const UserMaskWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<UserMaskWrapper>, tr1::shared_ptr<Mask> >();
+ bp::class_<UserMaskWrapper, tr1::shared_ptr<UserMaskWrapper>,
bp::bases<Mask>, boost::noncopyable>
(
"UserMask",
@@ -348,8 +349,8 @@ void expose_mask()
* UnacceptedMask
*/
bp::register_ptr_to_python<tr1::shared_ptr<const UnacceptedMask> >();
- bp::implicitly_convertible<tr1::shared_ptr<const UnacceptedMaskWrapper>, tr1::shared_ptr<const Mask> >();
- bp::class_<UnacceptedMaskWrapper, tr1::shared_ptr<const UnacceptedMaskWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<UnacceptedMaskWrapper>, tr1::shared_ptr<Mask> >();
+ bp::class_<UnacceptedMaskWrapper, tr1::shared_ptr<UnacceptedMaskWrapper>,
bp::bases<Mask>, boost::noncopyable>
(
"UnacceptedMask",
@@ -376,8 +377,8 @@ void expose_mask()
* RepositoryMask
*/
bp::register_ptr_to_python<tr1::shared_ptr<const RepositoryMask> >();
- bp::implicitly_convertible<tr1::shared_ptr<const RepositoryMaskWrapper>, tr1::shared_ptr<const Mask> >();
- bp::class_<RepositoryMaskWrapper, tr1::shared_ptr<const RepositoryMaskWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<RepositoryMaskWrapper>, tr1::shared_ptr<Mask> >();
+ bp::class_<RepositoryMaskWrapper, tr1::shared_ptr<RepositoryMaskWrapper>,
bp::bases<Mask>, boost::noncopyable>
(
"RepositoryMask",
@@ -404,8 +405,8 @@ void expose_mask()
* UnsupportedMask
*/
bp::register_ptr_to_python<tr1::shared_ptr<const UnsupportedMask> >();
- bp::implicitly_convertible<tr1::shared_ptr<const UnsupportedMaskWrapper>, tr1::shared_ptr<const Mask> >();
- bp::class_<UnsupportedMaskWrapper, tr1::shared_ptr<const UnsupportedMaskWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<UnsupportedMaskWrapper>, tr1::shared_ptr<Mask> >();
+ bp::class_<UnsupportedMaskWrapper, tr1::shared_ptr<UnsupportedMaskWrapper>,
bp::bases<Mask>, boost::noncopyable>
(
"UnsupportedMask",
@@ -432,8 +433,8 @@ void expose_mask()
* AssociationMask
*/
bp::register_ptr_to_python<tr1::shared_ptr<const AssociationMask> >();
- bp::implicitly_convertible<tr1::shared_ptr<const AssociationMaskWrapper>, tr1::shared_ptr<const Mask> >();
- bp::class_<AssociationMaskWrapper, tr1::shared_ptr<const AssociationMaskWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<AssociationMaskWrapper>, tr1::shared_ptr<Mask> >();
+ bp::class_<AssociationMaskWrapper, tr1::shared_ptr<AssociationMaskWrapper>,
bp::bases<Mask>, boost::noncopyable>
(
"AssociationMask",
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index bd8237e..f5ddd1b 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -307,11 +307,11 @@ struct MetadataSpecTreeKeyWrapper :
template <typename C_>
struct class_set_key :
- bp::class_<MetadataSetKeyWrapper<C_>, tr1::shared_ptr<const MetadataSetKeyWrapper<C_> >,
+ bp::class_<MetadataSetKeyWrapper<C_>, tr1::shared_ptr<MetadataSetKeyWrapper<C_> >,
bp::bases<MetadataKey>, boost::noncopyable>
{
class_set_key(const std::string & set) :
- bp::class_<MetadataSetKeyWrapper<C_>, tr1::shared_ptr<const MetadataSetKeyWrapper<C_> >,
+ bp::class_<MetadataSetKeyWrapper<C_>, tr1::shared_ptr<MetadataSetKeyWrapper<C_> >,
bp::bases<MetadataKey>, boost::noncopyable>(
("Metadata" + set + "Key").c_str(),
"NEED_DOC\n"
@@ -322,8 +322,8 @@ struct class_set_key :
)
{
bp::register_ptr_to_python<tr1::shared_ptr<const MetadataSetKey<C_> > >();
- bp::implicitly_convertible<tr1::shared_ptr<const MetadataSetKeyWrapper<C_> >,
- tr1::shared_ptr<const MetadataKey> >();
+ bp::implicitly_convertible<tr1::shared_ptr<MetadataSetKeyWrapper<C_> >,
+ tr1::shared_ptr<MetadataKey> >();
def("value", bp::pure_virtual(&MetadataSetKey<C_>::value),
("[ro] " + set + "\n").c_str());
@@ -332,11 +332,11 @@ struct class_set_key :
template <typename C_>
struct class_spec_tree_key :
- bp::class_<MetadataSpecTreeKeyWrapper<C_>, tr1::shared_ptr<const MetadataSpecTreeKeyWrapper<C_> >,
+ bp::class_<MetadataSpecTreeKeyWrapper<C_>, tr1::shared_ptr<MetadataSpecTreeKeyWrapper<C_> >,
bp::bases<MetadataKey>, boost::noncopyable>
{
class_spec_tree_key(const std::string & spec_tree) :
- bp::class_<MetadataSpecTreeKeyWrapper<C_>, tr1::shared_ptr<const MetadataSpecTreeKeyWrapper<C_> >,
+ bp::class_<MetadataSpecTreeKeyWrapper<C_>, tr1::shared_ptr<MetadataSpecTreeKeyWrapper<C_> >,
bp::bases<MetadataKey>, boost::noncopyable>(
("Metadata" + spec_tree + "Key").c_str(),
"NEED_DOC\n"
@@ -347,8 +347,8 @@ struct class_spec_tree_key :
)
{
bp::register_ptr_to_python<tr1::shared_ptr<const MetadataSpecTreeKey<C_> > >();
- bp::implicitly_convertible<tr1::shared_ptr<const MetadataSpecTreeKeyWrapper<C_> >,
- tr1::shared_ptr<const MetadataKey> >();
+ bp::implicitly_convertible<tr1::shared_ptr<MetadataSpecTreeKeyWrapper<C_> >,
+ tr1::shared_ptr<MetadataKey> >();
def("value", bp::pure_virtual(&MetadataSpecTreeKey<C_>::value),
("[ro] " + spec_tree + "\n").c_str());
@@ -369,6 +369,7 @@ void expose_metadata_key()
* MetadataKey
*/
MetadataKeySptrToPython();
+ register_shared_ptrs_to_python<MetadataKey>(rsp_non_const);
bp::class_<MetadataKey, boost::noncopyable>
(
"MetadataKey",
@@ -389,9 +390,9 @@ void expose_metadata_key()
* MetadataPackageIDKey
*/
bp::register_ptr_to_python<tr1::shared_ptr<const MetadataPackageIDKey> >();
- bp::implicitly_convertible<tr1::shared_ptr<const MetadataPackageIDKeyWrapper>,
- tr1::shared_ptr<const MetadataKey> >();
- bp::class_<MetadataPackageIDKeyWrapper, tr1::shared_ptr<const MetadataPackageIDKeyWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<MetadataPackageIDKeyWrapper>,
+ tr1::shared_ptr<MetadataKey> >();
+ bp::class_<MetadataPackageIDKeyWrapper, tr1::shared_ptr<MetadataPackageIDKeyWrapper>,
bp::bases<MetadataKey>, boost::noncopyable>
(
"MetadataPackageIDKey",
@@ -411,9 +412,9 @@ void expose_metadata_key()
* MetadataStringKey
*/
bp::register_ptr_to_python<tr1::shared_ptr<const MetadataStringKey> >();
- bp::implicitly_convertible<tr1::shared_ptr<const MetadataStringKeyWrapper>,
- tr1::shared_ptr<const MetadataKey> >();
- bp::class_<MetadataStringKeyWrapper, tr1::shared_ptr<const MetadataStringKeyWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<MetadataStringKeyWrapper>,
+ tr1::shared_ptr<MetadataKey> >();
+ bp::class_<MetadataStringKeyWrapper, tr1::shared_ptr<MetadataStringKeyWrapper>,
bp::bases<MetadataKey>, boost::noncopyable>
(
"MetadataStringKey",
@@ -433,9 +434,9 @@ void expose_metadata_key()
* MetadataTimeKey
*/
bp::register_ptr_to_python<tr1::shared_ptr<const MetadataTimeKey> >();
- bp::implicitly_convertible<tr1::shared_ptr<const MetadataTimeKeyWrapper>,
- tr1::shared_ptr<const MetadataKey> >();
- bp::class_<MetadataTimeKeyWrapper, tr1::shared_ptr<const MetadataTimeKeyWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<MetadataTimeKeyWrapper>,
+ tr1::shared_ptr<MetadataKey> >();
+ bp::class_<MetadataTimeKeyWrapper, tr1::shared_ptr<MetadataTimeKeyWrapper>,
bp::bases<MetadataKey>, boost::noncopyable>
(
"MetadataTimeKey",
@@ -454,9 +455,9 @@ void expose_metadata_key()
* MetadataContentsKey
*/
bp::register_ptr_to_python<tr1::shared_ptr<const MetadataContentsKey> >();
- bp::implicitly_convertible<tr1::shared_ptr<const MetadataContentsKeyWrapper>,
- tr1::shared_ptr<const MetadataKey> >();
- bp::class_<MetadataContentsKeyWrapper, tr1::shared_ptr<const MetadataContentsKeyWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<MetadataContentsKeyWrapper>,
+ tr1::shared_ptr<MetadataKey> >();
+ bp::class_<MetadataContentsKeyWrapper, tr1::shared_ptr<MetadataContentsKeyWrapper>,
bp::bases<MetadataKey>, boost::noncopyable>
(
"MetadataContentsKey",
@@ -488,9 +489,9 @@ void expose_metadata_key()
* MetadataRepositoryMaskInfoKey
*/
bp::register_ptr_to_python<tr1::shared_ptr<const MetadataRepositoryMaskInfoKey> >();
- bp::implicitly_convertible<tr1::shared_ptr<const MetadataRepositoryMaskInfoKeyWrapper>,
- tr1::shared_ptr<const MetadataKey> >();
- bp::class_<MetadataRepositoryMaskInfoKeyWrapper, tr1::shared_ptr<const MetadataRepositoryMaskInfoKeyWrapper>,
+ bp::implicitly_convertible<tr1::shared_ptr<MetadataRepositoryMaskInfoKeyWrapper>,
+ tr1::shared_ptr<MetadataKey> >();
+ bp::class_<MetadataRepositoryMaskInfoKeyWrapper, tr1::shared_ptr<MetadataRepositoryMaskInfoKeyWrapper>,
bp::bases<MetadataKey>, boost::noncopyable>
(
"MetadataRepositoryMaskInfoKey",