Skip to content

Commit 7d32271

Browse files
committed
rvalue_data -> rvalue_from_python_data
[SVN r14357]
1 parent 182b675 commit 7d32271

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

src/converter/builtin_converters.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <boost/python/detail/config.hpp>
88
#include <boost/python/detail/wrap_python.hpp>
99
#include <boost/python/converter/builtin_converters.hpp>
10-
#include <boost/python/converter/from_python_data.hpp>
10+
#include <boost/python/converter/rvalue_from_python_data.hpp>
1111
#include <boost/python/converter/registry.hpp>
1212
#include <boost/python/handle.hpp>
1313
#include <boost/python/type_id.hpp>
@@ -50,14 +50,14 @@ namespace
5050
return slot && *slot ? slot : 0;
5151
}
5252

53-
static void construct(PyObject* obj, rvalue_stage1_data* data)
53+
static void construct(PyObject* obj, rvalue_from_python_stage1_data* data)
5454
{
5555
// Get the (intermediate) source object
5656
unaryfunc creator = *static_cast<unaryfunc*>(data->convertible);
5757
handle<> intermediate(creator(obj));
5858

5959
// Get the location in which to construct
60-
void* storage = ((rvalue_base_data<T>*)data)->storage.bytes;
60+
void* storage = ((rvalue_from_python_storage<T>*)data)->storage.bytes;
6161
new (storage) T(SlotPolicy::extract(intermediate.get()));
6262

6363
// record successful construction

src/converter/callback.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace detail
1717

1818
namespace
1919
{
20-
inline PyObject* convert(void const volatile* source, to_python_function_t converter)
20+
inline PyObject* convert_to_python(void const volatile* source, to_python_function_t converter)
2121
{
2222
if (converter == 0)
2323
{
@@ -36,14 +36,14 @@ namespace detail
3636
arg_to_python_base::arg_to_python_base(
3737
void const volatile* source, to_python_function_t converter)
3838
# if !defined(BOOST_MSVC) || _MSC_FULL_VER != 13102140
39-
: handle<>(convert(source, converter))
39+
: handle<>(convert_to_python(source, converter))
4040
# else
41-
: m_ptr(convert(source, converter))
41+
: m_ptr(convert_to_python(source, converter))
4242
# endif
4343
{
4444
}
4545

46-
BOOST_PYTHON_DECL void throw_if_not_registered(rvalue_stage1_data const& data)
46+
BOOST_PYTHON_DECL void throw_if_not_registered(rvalue_from_python_stage1_data const& data)
4747
{
4848
if (!data.convertible)
4949
{
@@ -108,7 +108,7 @@ namespace detail
108108
throw_error_already_set();
109109
}
110110

111-
BOOST_PYTHON_DECL void* convert_rvalue(PyObject* src, rvalue_stage1_data& data, void* storage)
111+
BOOST_PYTHON_DECL void* convert_rvalue(PyObject* src, rvalue_from_python_stage1_data& data, void* storage)
112112
{
113113
handle<> holder(src);
114114

@@ -126,6 +126,11 @@ namespace detail
126126

127127
return data.convertible;
128128
}
129+
130+
BOOST_PYTHON_DECL void absorb_result(PyObject* o)
131+
{
132+
Py_DECREF(expect_non_null(o));
133+
}
129134
}
130135

131136
}}} // namespace boost::python::converter

src/converter/from_python.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@
66

77
#include <boost/python/converter/find_from_python.hpp>
88
#include <boost/python/converter/registrations.hpp>
9-
#include <boost/python/converter/from_python_data.hpp>
9+
#include <boost/python/converter/rvalue_from_python_data.hpp>
10+
#include <boost/python/converter/registrations.hpp>
11+
#include <boost/python/detail/wrap_python.hpp>
1012
#include <vector>
1113
#include <algorithm>
1214

1315
namespace boost { namespace python { namespace converter {
1416

15-
BOOST_PYTHON_DECL rvalue_stage1_data find(
17+
BOOST_PYTHON_DECL rvalue_from_python_stage1_data find(
1618
PyObject* source
1719
, rvalue_from_python_registration const* chain)
1820
{
19-
rvalue_stage1_data data;
21+
rvalue_from_python_stage1_data data;
2022
data.convertible = 0;
2123
for (;chain != 0; chain = chain->next)
2224
{

0 commit comments

Comments
 (0)