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

Nicer syntactic sugar

[SVN r12447]
This commit is contained in:
Dave Abrahams
2002-01-22 19:51:04 +00:00
parent 51a66a3202
commit 0389aab0a3
5 changed files with 90 additions and 65 deletions

View File

@@ -11,7 +11,6 @@
#include <boost/python/detail/map_entry.hpp>
#include <boost/detail/binary_search.hpp>
#include <boost/bind.hpp>
#include <boost/python/detail/wrap_python.hpp>
#include <functional>
#include <vector>
@@ -190,11 +189,11 @@ namespace
std::vector<entry>::const_iterator p
= boost::detail::lower_bound(start, finish, id);
if (p == finish && p->key != id)
{
string report("extension class wrapper for base class ");
(report += id.name()) += "has not been created yet";
(report += id.name()) += " has not been created yet";
PyErr_SetObject(PyExc_RuntimeError, report.get());
throw error_already_set();
}
@@ -212,7 +211,7 @@ namespace
}
class_base::class_base(
module& m, char const* name, std::size_t num_types, class_id const* const types)
char const* name, std::size_t num_types, class_id const* const types)
{
class_registry& r = registry();
assert(num_types >= 1);
@@ -234,7 +233,6 @@ class_base::class_base(
m_object = ref(PyObject_CallObject(class_metatype().get(), args.get()));
r.set(types[0], m_object);
m.add(m_object, name);
}
}}} // namespace boost::python::objects