Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion include/pybind11/pybind11.h
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,14 @@ class cpp_function : public function {

std::string signatures;
int index = 0;
auto append_doc_signature = [&signatures](const char *sig) {
for (const char *p = sig; *p != '\0'; ++p) {
if (*p == '*') {
signatures += '\\';
}
signatures += *p;
}
};
/* Create a nice pydoc rec including all signatures and
docstrings of the functions in the overload chain */
if (chain && options::show_function_signatures()
Expand All @@ -876,7 +884,7 @@ class cpp_function : public function {
signatures += std::to_string(++index) + ". ";
}
signatures += rec->name;
signatures += it->signature;
append_doc_signature(it->signature);
signatures += '\n';
}
if (it->doc && it->doc[0] != '\0' && options::show_user_defined_docstrings()) {
Expand Down