mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Fixed typo in classes.rst (#1388)
Fixed typos (erroneous `;`) in `classes.rst`.
This commit is contained in:
parent
5ef1af138d
commit
ce9d6e2c0d
@ -46,7 +46,7 @@ Normally, the binding code for these classes would look as follows:
|
||||
.. code-block:: cpp
|
||||
|
||||
PYBIND11_MODULE(example, m) {
|
||||
py::class_<Animal>(m, "Animal");
|
||||
py::class_<Animal>(m, "Animal")
|
||||
.def("go", &Animal::go);
|
||||
|
||||
py::class_<Dog, Animal>(m, "Dog")
|
||||
@ -95,7 +95,7 @@ The binding code also needs a few minor adaptations (highlighted):
|
||||
:emphasize-lines: 2,3
|
||||
|
||||
PYBIND11_MODULE(example, m) {
|
||||
py::class_<Animal, PyAnimal /* <--- trampoline*/>(m, "Animal");
|
||||
py::class_<Animal, PyAnimal /* <--- trampoline*/>(m, "Animal")
|
||||
.def(py::init<>())
|
||||
.def("go", &Animal::go);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user