2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

Integrated Scott Snyder's nested class patch

[SVN r12080]
This commit is contained in:
Dave Abrahams
2001-12-17 05:49:24 +00:00
parent bed2c8a371
commit 291c36df05
5 changed files with 55 additions and 1 deletions

View File

@@ -25,6 +25,22 @@ class class_builder
module.add(ref(as_object(m_class.get()), ref::increment_count), name);
}
template <class OtherT, class OtherU>
class_builder(class_builder<OtherT, OtherU>& cls, const char* name)
: m_class(new detail::extension_class<T, U>(name))
{
cls.add(ref(as_object(m_class.get()), ref::increment_count), name);
}
template <class OtherT, class OtherU>
class_builder(detail::extension_class<OtherT, OtherU>* cls,
const char* name)
: m_class(new detail::extension_class<T, U>(name))
{
cls->set_attribute(name,
ref(as_object(m_class.get()), ref::increment_count));
}
~class_builder()
{}