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

Patches by Nikolay Mladenov (nickm at sitius com): new pythonic signatures; docstring support for enums; fix unrelated Visual C++ 6 problem

[SVN r39191]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2007-09-11 16:53:50 +00:00
parent 04e54d670c
commit 5809078ba9
82 changed files with 2523 additions and 341 deletions

View File

@@ -121,7 +121,7 @@ object module_prefix();
namespace
{
object new_enum_type(char const* name)
object new_enum_type(char const* name, char const *doc)
{
if (enum_type_object.tp_dict == 0)
{
@@ -143,6 +143,8 @@ namespace
object module_name = module_prefix();
if (module_name)
d["__module__"] = module_name;
if (doc)
d["__doc__"] = doc;
object result = (object(metatype))(name, make_tuple(base), d);
@@ -158,8 +160,9 @@ enum_base::enum_base(
, converter::convertible_function convertible
, converter::constructor_function construct
, type_info id
, char const *doc
)
: object(new_enum_type(name))
: object(new_enum_type(name, doc))
{
converter::registration& converters
= const_cast<converter::registration&>(