Skip to content

Commit 134bc44

Browse files
committed
destroy_reference -> destroy_referent
[SVN r14486]
1 parent 1d2dc98 commit 134bc44

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

include/boost/python/converter/rvalue_from_python_data.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ template <class T>
129129
inline rvalue_from_python_data<T>::~rvalue_from_python_data()
130130
{
131131
if (this->stage1.convertible == this->storage.bytes)
132-
python::detail::destroy_reference<ref_type>(this->storage.bytes);
132+
python::detail::destroy_referent<ref_type>(this->storage.bytes);
133133
}
134134

135135
}}} // namespace boost::python::converter

include/boost/python/detail/destroy.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct value_destroyer<false,true>
6262
};
6363

6464
template <class T>
65-
inline void destroy_reference_impl(void* p, T& (*)())
65+
inline void destroy_referent_impl(void* p, T& (*)())
6666
{
6767
// note: cv-qualification needed for MSVC6
6868
// must come *before* T for metrowerks
@@ -73,9 +73,9 @@ inline void destroy_reference_impl(void* p, T& (*)())
7373
}
7474

7575
template <class T>
76-
inline void destroy_reference(void* p, T(*)() = 0)
76+
inline void destroy_referent(void* p, T(*)() = 0)
7777
{
78-
destroy_reference_impl(p, (T(*)())0);
78+
destroy_referent_impl(p, (T(*)())0);
7979
}
8080

8181
}}} // namespace boost::python::detail

test/destroy_test.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ struct bar;
55

66
namespace boost
77
{
8-
// lie to the library about bar so we can show that it's destructor is optimized away.
8+
// lie to the library about bar so we can show that its destructor is optimized away.
99
template <>
1010
struct has_trivial_destructor<bar>
1111
{
@@ -48,33 +48,33 @@ int main()
4848
typedef int a[2];
4949

5050
foo* f1 = new foo;
51-
boost::python::detail::destroy_reference<foo const volatile&>(f1);
51+
boost::python::detail::destroy_referent<foo const volatile&>(f1);
5252
assert_destructions(1);
5353

5454
foo* f2 = new foo[2];
5555
typedef foo x[2];
5656

57-
boost::python::detail::destroy_reference<x const&>(f2);
57+
boost::python::detail::destroy_referent<x const&>(f2);
5858
assert_destructions(3);
5959

6060
typedef foo y[2][2];
6161
x* f3 = new y;
62-
boost::python::detail::destroy_reference<y&>(f3);
62+
boost::python::detail::destroy_referent<y&>(f3);
6363
assert_destructions(7);
6464

6565
bar* b1 = new bar;
66-
boost::python::detail::destroy_reference<bar&>(b1);
66+
boost::python::detail::destroy_referent<bar&>(b1);
6767
assert_destructions(7);
6868

6969
bar* b2 = new bar[2];
7070
typedef bar xb[2];
7171

72-
boost::python::detail::destroy_reference<xb&>(b2);
72+
boost::python::detail::destroy_referent<xb&>(b2);
7373
assert_destructions(7);
7474

7575
typedef bar yb[2][2];
7676
xb* b3 = new yb;
77-
boost::python::detail::destroy_reference<yb&>(b3);
77+
boost::python::detail::destroy_referent<yb&>(b3);
7878
assert_destructions(7);
7979

8080
return 0;

0 commit comments

Comments
 (0)