File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1979,16 +1979,19 @@ struct enum_base {
1979
1979
std::string docstring;
1980
1980
dict entries = arg.attr (" __entries" );
1981
1981
if (((PyTypeObject *) arg.ptr ())->tp_doc ) {
1982
- docstring
1983
- += std::string (((PyTypeObject *) arg.ptr ())->tp_doc ) + " \n\n " ;
1982
+ docstring += std::string (
1983
+ reinterpret_cast <PyTypeObject *>(arg.ptr ())->tp_doc );
1984
+ docstring += " \n\n " ;
1984
1985
}
1985
1986
docstring += " Members:" ;
1986
1987
for (auto kv : entries) {
1987
1988
auto key = std::string (pybind11::str (kv.first ));
1988
1989
auto comment = kv.second [int_ (1 )];
1989
- docstring += " \n\n " + key;
1990
+ docstring += " \n\n " ;
1991
+ docstring += key;
1990
1992
if (!comment.is_none ()) {
1991
- docstring += " : " + (std::string) pybind11::str (comment);
1993
+ docstring += " : " ;
1994
+ docstring += pybind11::str (comment).cast <std::string>();
1992
1995
}
1993
1996
}
1994
1997
return docstring;
You can’t perform that action at this time.
0 commit comments