2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

rvalue_data -> rvalue_from_python_data

[SVN r14355]
This commit is contained in:
Dave Abrahams
2002-07-08 19:17:00 +00:00
parent 0945f79ced
commit 182b6755f5
4 changed files with 13 additions and 13 deletions

View File

@@ -111,7 +111,7 @@ struct arg_rvalue_from_python
result_type operator()(PyObject*);
private:
rvalue_data<result_type> m_data;
rvalue_from_python_data<result_type> m_data;
};

View File

@@ -28,7 +28,7 @@ struct implicit
= static_cast<rvalue_from_python_registration*>(data->convertible);
// Call the convertible function again
rvalue_data<Source> intermediate_data(registration->convertible(obj));
rvalue_from_python_data<Source> intermediate_data(registration->convertible(obj));
// Use the result to construct the source type if the first
// converter was an rvalue converter.

View File

@@ -41,7 +41,7 @@ namespace detail
return_rvalue_from_python();
result_type operator()(PyObject*);
private:
rvalue_data<T> m_data;
rvalue_from_python_data<T> m_data;
};
template <class T>

View File

@@ -83,25 +83,25 @@ struct rvalue_from_python_storage
// Augments rvalue_from_python_storage<T> with a destructor. If
// stage1.convertible == storage.bytes, it indicates that an object of
// remove_reference<T>::type has been constructed in storage and
// should will be destroyed in ~rvalue_data(). It is crucial that
// successful rvalue conversions establish this equality and that
// unsuccessful ones do not.
// should will be destroyed in ~rvalue_from_python_data(). It is
// crucial that successful rvalue conversions establish this equality
// and that unsuccessful ones do not.
template <class T>
struct rvalue_data : rvalue_from_python_storage<T>
struct rvalue_from_python_data : rvalue_from_python_storage<T>
{
// This must always be a POD struct with m_data its first member.
BOOST_STATIC_ASSERT(offsetof(rvalue_from_python_storage<T>,stage1) == 0);
// The usual constructor
rvalue_data(rvalue_from_python_stage1_data const&);
rvalue_from_python_data(rvalue_from_python_stage1_data const&);
// This constructor just sets m_convertible -- used by
// implicitly_convertible<> to perform the final step of the
// conversion, where the construct() function is already known.
rvalue_data(void* convertible);
rvalue_from_python_data(void* convertible);
// Destroys any object constructed in the storage.
~rvalue_data();
~rvalue_from_python_data();
private:
typedef typename add_reference<typename add_cv<T>::type>::type ref_type;
};
@@ -110,19 +110,19 @@ struct rvalue_data : rvalue_from_python_storage<T>
// Implementataions
//
template <class T>
inline rvalue_data<T>::rvalue_data(rvalue_from_python_stage1_data const& stage1)
inline rvalue_from_python_data<T>::rvalue_from_python_data(rvalue_from_python_stage1_data const& stage1)
{
this->stage1 = stage1;
}
template <class T>
inline rvalue_data<T>::rvalue_data(void* convertible)
inline rvalue_from_python_data<T>::rvalue_from_python_data(void* convertible)
{
this->stage1.convertible = convertible;
}
template <class T>
inline rvalue_data<T>::~rvalue_data()
inline rvalue_from_python_data<T>::~rvalue_from_python_data()
{
if (this->stage1.convertible == this->storage.bytes)
python::detail::destroy_reference<ref_type>(this->storage.bytes);