Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
8d862b37
Commit
8d862b37
authored
Mar 06, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documentation updates (clarified cross-module dependencies, added contributors, improved CSS)
parent
bce8a4b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
README.md
+4
-3
docs/_static/theme_overrides.css
+2
-2
docs/advanced.rst
+16
-2
No files found.
README.md
View file @
8d862b37
...
...
@@ -4,7 +4,7 @@
[

](http://pybind11.readthedocs.org/en/latest/?badge=latest)
[

](https://travis-ci.org/pybind/pybind11)
[

](https://ci.appveyor.com/project/
pybind
/pybind11)
[

](https://ci.appveyor.com/project/
wjakob
/pybind11)
**pybind11**
is a lightweight header-only library that exposes C++ types in Python
and vice versa, mainly to create Python bindings of existing C++ code. Its
...
...
@@ -92,8 +92,9 @@ Significant features and/or improvements to the code were contributed by
Jonas Adler,
Sylvain Corlay,
Axel Huebl,
Johan Mabille, and
Tomasz Miąsko.
Johan Mabille,
Tomasz Miąsko, and
Ben Pritchard.
### License
...
...
docs/_static/theme_overrides.css
View file @
8d862b37
.wy-table-responsive
table
td
,
.wy-table-responsive
table
th
{
white-space
:
initial
;
white-space
:
initial
!important
;
}
.rst-content
table
.docutils
td
{
vertical-align
:
top
;
vertical-align
:
top
!important
;
}
docs/advanced.rst
View file @
8d862b37
...
...
@@ -1019,8 +1019,8 @@ like so:
Partitioning code over multiple extension modules
=================================================
It's straightforward to split binding code over multiple extension modules
and
referenc
e types
declared elsewhere. Everything "just" works without any special
It's straightforward to split binding code over multiple extension modules
, while
referenc
ing types that are
declared elsewhere. Everything "just" works without any special
precautions. One exception to this rule occurs when wanting to extend a type declared
in another extension module. Recall the basic example from Section
:ref:`inheritance`.
...
...
@@ -1049,3 +1049,17 @@ However, it can be acquired as follows:
.def(py::init<const std::string &>())
.def("bark", &Dog::bark);
Alternatively, we can rely on the ``base`` tag, which performs an automated
lookup of the corresponding Python type. However, this also requires invoking
the ``import`` function once to ensure that the pybind11 binding code of the
module ``basic`` has been executed.
Naturally, both methods will fail when there are cyclic dependencies.
.. code-block:: cpp
py::module::import("basic");
py::class_<Dog>(m, "Dog", py::base<Pet>())
.def(py::init<const std::string &>())
.def("bark", &Dog::bark);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment