2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-27 19:12:16 +00:00

Avoid degrading slice to object in generated sig

This commit is contained in:
Jakob van Santen
2023-04-26 21:03:32 +02:00
committed by Stefan Seefeld
parent c4e3b13dc2
commit d1910f3d65
2 changed files with 12 additions and 0 deletions

View File

@@ -34,4 +34,14 @@ slice_base::step() const
((PySliceObject*)this->ptr())->step));
}
static struct register_slice_pytype_ptr
{
register_slice_pytype_ptr()
{
const_cast<converter::registration &>(
converter::registry::lookup(boost::python::type_id<boost::python::slice>())
).m_class_object = &PySlice_Type;
}
}register_slice_pytype_ptr_;
} } } // !namespace boost::python::detail