Skip to content

Commit ea6c121

Browse files
committed
Pull changes from wrap
1 parent 8a1c412 commit ea6c121

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

wrap/gtwrap/xml_parser/xml_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def extract_docstring(self, xml_folder: str, cpp_class: str,
5858

5959
# Extract the docs for the function that matches cpp_class.cpp_method(*method_args_names).
6060
return self.get_formatted_docstring(member_defs[documenting_index],
61-
ignored_params)
61+
ignored_params) if member_defs else ""
6262

6363
def get_member_defs(self, xml_folder: str, cpp_class: str,
6464
cpp_method: str):
@@ -95,7 +95,7 @@ def get_member_defs(self, xml_folder: str, cpp_class: str,
9595
return ""
9696

9797
# Create the path to the file with the documentation for cpp_class.
98-
xml_class_file = xml_folder_path / class_index.attrib['refid'] + '.xml'
98+
xml_class_file = xml_folder_path / f"{class_index.attrib['refid']}.xml"
9999

100100
# Parse the class file
101101
class_tree = self.parse_xml(xml_class_file)

wrap/pybind11/tests/object.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,5 @@ class ref {
201201
private:
202202
T *m_ptr;
203203
};
204+
205+
#endif /* __OBJECT_H */

0 commit comments

Comments
 (0)