From 5b4968df3aa5a955f3401a94ac7b0d7beee805d3 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Mon, 12 Sep 2016 16:04:31 -0400 Subject: [PATCH 1/2] Make the gcc6/python 3.5 build use debug mode --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 975911d3..2fc12c18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ matrix: env: PYTHON=2.7 CPP=14 GCC=6 - sudo: true services: docker - env: PYTHON=3.5 CPP=14 GCC=6 + env: PYTHON=3.5 CPP=14 GCC=6 DEBUG=1 - os: osx osx_image: xcode7.3 env: PYTHON=2.7 CPP=14 CLANG @@ -59,6 +59,7 @@ before_install: fi if [ -n "$CPP" ]; then export CPP=-std=c++$CPP; fi if [ "${PYTHON:0:1}" = "3" ]; then export PY=3; fi + if [ -n "$DEBUG" ]; then export CMAKE_EXTRA_ARGS="-DCMAKE_BUILD_TYPE=Debug"; fi - | # Initialize enviornment if [ -n "$DOCKER" ]; then From 4a4fb396e7f648eb249aa11bc6e40beeb1a2f9e1 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Mon, 12 Sep 2016 16:21:40 -0400 Subject: [PATCH 2/2] Fix build under debug mode Take load_type by nested type_caster template arguments instead of by full type_caster type. --- include/pybind11/cast.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index c86f7c21..b885298a 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -864,7 +864,7 @@ template using cast_is_temporary_value_reference = bool_constant >; // Basic python -> C++ casting; throws if casting fails -template TypeCaster &load_type(TypeCaster &conv, const handle &handle) { +template type_caster &load_type(type_caster &conv, const handle &handle) { if (!conv.load(handle, true)) { #if defined(NDEBUG) throw cast_error("Unable to cast Python instance to C++ type (compile in debug mode for details)");