◐ Shell
reader mode source ↗
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
2 changes: 1 addition & 1 deletion lib/pybind11
Submodule pybind11 updated 179 files
10 changes: 4 additions & 6 deletions src/python_cpp_example/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace py = pybind11;

PYBIND11_PLUGIN(python_cpp_example) {
py::module m("python_cpp_example", R"doc(
Python module
-----------------------
.. currentmodule:: python_cpp_example
Expand All @@ -13,7 +13,7 @@ PYBIND11_PLUGIN(python_cpp_example) {

add
subtract
)doc");

m.def("add", &add, R"doc(
Add two numbers
@@ -26,6 +26,4 @@ PYBIND11_PLUGIN(python_cpp_example) {

Some other information about the subtract function.
)doc");

return m.ptr();
}
2 changes: 1 addition & 1 deletion src/python_cpp_example/hello.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

def say_hello():
print("Hello world!")
2 changes: 1 addition & 1 deletion tests/math_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ def test_subtract(self):
self.assertEqual(python_cpp_example.subtract(1, 1), 0)

if __name__ == '__main__':
unittest.main()
Toggle all file notes Toggle all file annotations