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

This commit was manufactured by cvs2svn to create branch 'cursor'.

[SVN r8363]
This commit is contained in:
nobody
2000-11-30 04:53:32 +00:00
42 changed files with 3162 additions and 557 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)
{