diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d411f54f..b1fcb9bb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,7 +146,8 @@ elseif (UNIX) # that's statically linked into an application like Blender or Maya. # If we link our plugin library against the OS Python here and import it # into Blender or Maya later on, this will cause segfaults when multiple - # conflicting Python instances are active at the same time. + # conflicting Python instances are active at the same time (even when they + # are of the same version). # Windows is not affected by this issue since it handles DLL imports # differently. The solution for Linux and Mac OS is simple: we just don't diff --git a/README.md b/README.md index 96560e46e..6167fe000 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![pybind11 logo](https://github.com/wjakob/pybind11/raw/master/logo.png) +![pybind11 logo](https://github.com/wjakob/pybind11/raw/master/docs/pybind11-logo.png) # pybind11 — Seamless operability between C++11 and Python @@ -23,7 +23,7 @@ become an excessively large and unnecessary dependency. Think of this library as a tiny self-contained version of Boost.Python with everything stripped away that isn't relevant for binding generation. The core -header files only require ~3K lines of code and depend on Python (2.7 or 3.x) +header files only require ~2.5K lines of code and depend on Python (2.7 or 3.x) and the C++ standard library. This compact implementation was possible thanks to some of the new C++11 language features (specifically: tuples, lambda functions and variadic templates). Since its creation, this library has grown @@ -74,8 +74,8 @@ In addition to the core functionality, pybind11 provides some extra goodies: - Binaries are generally smaller by a factor of 2 or more compared to equivalent bindings generated by Boost.Python. -- When supported by the compiler, two new C++14 features (relaxed constexpr, - return value deduction) such as are used to do additional work at compile +- When supported by the compiler, two new C++14 features (relaxed constexpr and + return value deduction) are used to deduce function signatures at compile time, leading to smaller binaries. ### License diff --git a/docs/basics.rst b/docs/basics.rst index 65109b2b0..ac7062ce5 100644 --- a/docs/basics.rst +++ b/docs/basics.rst @@ -173,7 +173,7 @@ The keyword names also appear in the function signatures within the documentatio FUNCTIONS add(...) - Signature : (i: int32_t, j: int32_t) -> int32_t + Signature : (i: int, j: int) -> int A function which adds two numbers @@ -209,7 +209,7 @@ The default values also appear within the documentation. FUNCTIONS add(...) - Signature : (i: int32_t = 1L, j: int32_t = 2L) -> int32_t + Signature : (i: int = 1, j: int = 2) -> int A function which adds two numbers @@ -253,7 +253,9 @@ as arguments and return values, refer to the section on binding :ref:`classes`. +------------------------+--------------------------+-----------------------+ | std::vector | STL dynamic array | pybind11/stl.h | +------------------------+--------------------------+-----------------------+ -| std::map | STL dynamic maps | pybind11/stl.h | +| std::map | STL ordered map | pybind11/stl.h | ++------------------------+--------------------------+-----------------------+ +| std::set | STL ordered set | pybind11/stl.h | +------------------------+--------------------------+-----------------------+ | std::function<...> | STL polymorphic function | pybind11/functional.h | +------------------------+--------------------------+-----------------------+ diff --git a/docs/classes.rst b/docs/classes.rst index 9fc69744d..81621bd93 100644 --- a/docs/classes.rst +++ b/docs/classes.rst @@ -240,10 +240,10 @@ The overload signatures are also visible in the method's docstring: | Methods defined here: | | __init__(...) - | Signature : (Pet, str, int32_t) -> None + | Signature : (Pet, str, int) -> None | | set(...) - | 1. Signature : (Pet, int32_t) -> None + | 1. Signature : (Pet, int) -> None | | Set the pet's age | diff --git a/docs/cmake.rst b/docs/cmake.rst index c44366f22..50d50b5d4 100644 --- a/docs/cmake.rst +++ b/docs/cmake.rst @@ -100,7 +100,8 @@ and that the pybind11 repository is located in a subdirectory named :file:`pybin # that's statically linked into an application like Blender or Maya. # If we link our plugin library against the OS Python here and import it # into Blender or Maya later on, this will cause segfaults when multiple - # conflicting Python instances are active at the same time. + # conflicting Python instances are active at the same time (even when they + # are of the same version). # Windows is not affected by this issue since it handles DLL imports # differently. The solution for Linux and Mac OS is simple: we just don't diff --git a/docs/index.rst b/docs/index.rst index 44f47c3ef..a05661ebe 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,8 @@ +.. image:: pybind11-logo.png + pybind11 --- Seamless operability between C++11 and Python ========================================================== - Contents: .. toctree:: diff --git a/docs/intro.rst b/docs/intro.rst index 291469b1b..cb9dc9c5b 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -1,3 +1,5 @@ +.. image:: pybind11-logo.png + About this project ================== **pybind11** is a lightweight header-only library that exposes C++ types in Python @@ -18,7 +20,7 @@ become an excessively large and unnecessary dependency. Think of this library as a tiny self-contained version of Boost.Python with everything stripped away that isn't relevant for binding generation. The core -header files only require ~3K lines of code and depend on Python (2.7 or 3.x) +header files only require ~2.5K lines of code and depend on Python (2.7 or 3.x) and the C++ standard library. This compact implementation was possible thanks to some of the new C++11 language features (specifically: tuples, lambda functions and variadic templates). Since its creation, this library has grown @@ -68,6 +70,6 @@ In addition to the core functionality, pybind11 provides some extra goodies: - Binaries are generally smaller by a factor of 2 or more compared to equivalent bindings generated by Boost.Python. -- When supported by the compiler, two new C++14 features (relaxed constexpr, - return value deduction) such as are used to do additional work at compile +- When supported by the compiler, two new C++14 features (relaxed constexpr and + return value deduction) are used to deduce function signatures at compile time, leading to smaller binaries. diff --git a/docs/pybind11-logo.png b/docs/pybind11-logo.png new file mode 100644 index 000000000..4cbad54f7 Binary files /dev/null and b/docs/pybind11-logo.png differ diff --git a/logo.png b/logo.png deleted file mode 100644 index 36d4c6c90..000000000 Binary files a/logo.png and /dev/null differ