Skip to content

Commit 91b23c8

Browse files
committed
Warning suppression thanks to Mike Rovner <mike-at-bindkey.com>
[SVN r20617]
1 parent 3729be2 commit 91b23c8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/boost/python/converter/builtin_converters.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ BOOST_PYTHON_TO_PYTHON_BY_VALUE(unsigned BOOST_PYTHON_LONG_LONG, ::PyLong_FromUn
111111

112112
BOOST_PYTHON_TO_PYTHON_BY_VALUE(char, converter::do_return_to_python(x))
113113
BOOST_PYTHON_TO_PYTHON_BY_VALUE(char const*, converter::do_return_to_python(x))
114-
BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::string, ::PyString_FromStringAndSize(x.data(),x.size()))
114+
BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::string, ::PyString_FromStringAndSize(x.data(),static_cast<int>(x.size())))
115115
# ifndef BOOST_NO_STD_WSTRING
116-
BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::wstring, ::PyUnicode_FromWideChar(x.data(),x.size()))
116+
BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::wstring, ::PyUnicode_FromWideChar(x.data(),static_cast<int>(x.size())))
117117
# endif
118118
BOOST_PYTHON_TO_PYTHON_BY_VALUE(float, ::PyFloat_FromDouble(x))
119119
BOOST_PYTHON_TO_PYTHON_BY_VALUE(double, ::PyFloat_FromDouble(x))

src/converter/builtin_converters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace
7575

7676
// Get the location in which to construct
7777
void* storage = ((rvalue_from_python_storage<T>*)data)->storage.bytes;
78-
new (storage) T(SlotPolicy::extract(intermediate.get()));
78+
new (storage) T(static_cast<T>(SlotPolicy::extract(intermediate.get())));
7979

8080
// record successful construction
8181
data->convertible = storage;

0 commit comments

Comments
 (0)