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

Last rewrite of the type conversion mechanism, I hope

[SVN r12631]
This commit is contained in:
Dave Abrahams
2002-02-02 14:04:48 +00:00
parent 12988b879e
commit 25c56164b0
29 changed files with 305 additions and 916 deletions

View File

@@ -5,6 +5,7 @@
// to its suitability for any purpose.
#include <boost/python/converter/from_python.hpp>
#include <boost/python/converter/registry.hpp>
namespace boost { namespace python { namespace converter {
@@ -14,14 +15,12 @@ from_python_converter_base::from_python_converter_base(
)
: body(type)
, m_convertible(checker)
{
registry::insert(*this);
}
from_python_converter_base::~from_python_converter_base()
{
if (can_unregister())
registry::remove(*this);
// Insert this in the converter chain.
from_python_converter_base*& head = registry::from_python_chain(type);
m_next = head;
head = this;
}
}}} // namespace boost::python::converter