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

This commit was manufactured by cvs2svn to create branch

'boost_python_friend_fixes'.

[SVN r10123]
This commit is contained in:
nobody
2001-05-18 15:12:31 +00:00
parent 9b602d16b4
commit 9261e2a3d9
95 changed files with 8404 additions and 925 deletions

View File

@@ -14,10 +14,15 @@ namespace {
ref name_holder;
}
bool module_builder::initializing()
{
return name_holder.get() != 0;
}
string module_builder::name()
{
// If this fails, you haven't created a module_builder object
assert(name_holder.get() != 0);
assert(initializing());
return string(name_holder);
}
@@ -29,6 +34,11 @@ module_builder::module_builder(const char* name)
name_holder = ref(PyObject_GetAttrString(m_module, const_cast<char*>("__name__")));
}
module_builder::~module_builder()
{
name_holder.reset();
}
void
module_builder::add(detail::function* x, const char* name)
{