Update pybind11 submodule to v2.2

This commit is contained in:
Dean Moldovan 2017-08-31 20:50:50 +02:00
parent a3a63d7288
commit 8818f493e3
4 changed files with 12 additions and 28 deletions

View file

@ -1,5 +1,5 @@
version: '{build}'
image: Visual Studio 2015
image: Visual Studio 2017
platform:
- x86
- x64
@ -8,7 +8,7 @@ environment:
- PYTHON: 27
- PYTHON: 36
- CONDA: 27
- CONDA: 35
- CONDA: 36
install:
- ps: |
git submodule update -q --init --recursive

View file

@ -1,4 +1,5 @@
language: cpp
dist: trusty
matrix:
include:
- os: linux
@ -8,7 +9,7 @@ matrix:
- os: linux
env: CONDA=2.7
- os: linux
env: CONDA=3.5
env: CONDA=3.6
- os: osx
env: PYTHON=2.7
- os: osx
@ -16,18 +17,7 @@ matrix:
- os: osx
env: CONDA=2.7
- os: osx
env: CONDA=3.5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- deadsnakes
- kubuntu-backports
packages:
- g++-4.8
- python3.5
- python3.5-dev
- cmake
env: CONDA=3.6
before_install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi

@ -1 +1 @@
Subproject commit e33ef9c20d36fe760792c61ccc95ecf1b42cf81d
Subproject commit 2a5a5ec0a47c245fbf1bb1a8a90b4c3278e01693

View file

@ -4,14 +4,10 @@ int add(int i, int j) {
return i + j;
}
int subtract(int i, int j) {
return i - j;
}
namespace py = pybind11;
PYBIND11_PLUGIN(cmake_example) {
py::module m("cmake_example", R"pbdoc(
PYBIND11_MODULE(cmake_example, m) {
m.doc() = R"pbdoc(
Pybind11 example plugin
-----------------------
@ -22,7 +18,7 @@ PYBIND11_PLUGIN(cmake_example) {
add
subtract
)pbdoc");
)pbdoc";
m.def("add", &add, R"pbdoc(
Add two numbers
@ -30,17 +26,15 @@ PYBIND11_PLUGIN(cmake_example) {
Some other explanation about the add function.
)pbdoc");
m.def("subtract", &subtract, R"pbdoc(
m.def("subtract", [](int i, int j) { return i - j; }, R"pbdoc(
Subtract two numbers
Some other explanation about the subtract function.
)pbdoc");
#ifdef VERSION_INFO
m.attr("__version__") = py::str(VERSION_INFO);
m.attr("__version__") = VERSION_INFO;
#else
m.attr("__version__") = py::str("dev");
m.attr("__version__") = "dev";
#endif
return m.ptr();
}