2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-25 06:22:15 +00:00

Bug fix, thanks to Pearu Pearson for pointing it out!

[SVN r14055]
This commit is contained in:
Dave Abrahams
2002-05-28 23:47:38 +00:00
parent b03dcfb7de
commit f5a0b2fed8

View File

@@ -91,16 +91,14 @@ void* value_holder_back_reference<Held,BackReferenceType>::holds(
type_info dst_t)
{
type_info src_t = python::type_id<Held>();
if (src_t == dst_t)
{
Held* x = &m_held;
Held* x = &m_held;
if (dst_t == src_t)
return x;
}
src_t = python::type_id<BackReferenceType>();
return src_t == dst_t
? &m_held
: find_static_type(&m_held, src_t, dst_t);
else if (dst_t == python::type_id<BackReferenceType>())
return &m_held;
else
return find_static_type(x, src_t, dst_t);
}
}}} // namespace boost::python::objects