mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 18:12:43 +00:00
std::complex<> fixes for MSVC
[SVN r9418]
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
// producing this work.
|
||||
//
|
||||
// Revision History:
|
||||
// Mar 03 01 added: converters for [plain] char (Ralf W. Grosse-Kunstleve)
|
||||
// 04 Mar 01 std::complex<> fixes for MSVC (Dave Abrahams)
|
||||
// 03 Mar 01 added: converters for [plain] char (Ralf W. Grosse-Kunstleve)
|
||||
|
||||
#include <boost/python/conversions.hpp>
|
||||
#include <typeinfo>
|
||||
@@ -47,6 +48,19 @@ void handle_exception()
|
||||
}
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
void expect_complex(PyObject* p)
|
||||
{
|
||||
if (!PyComplex_Check(p))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, "expected a complex number");
|
||||
throw boost::python::argument_error();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace boost::python::detail
|
||||
|
||||
}} // namespace boost::python
|
||||
|
||||
BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user