mirror of
https://github.com/boostorg/python.git
synced 2026-01-27 07:02:15 +00:00
attempt unverified workaround for http://tinyurl.com/gvrgd
[SVN r35103]
This commit is contained in:
@@ -304,13 +304,16 @@ namespace
|
||||
static std::wstring extract(PyObject* intermediate)
|
||||
{
|
||||
std::wstring result(::PyObject_Length(intermediate), L' ');
|
||||
int err = PyUnicode_AsWideChar(
|
||||
(PyUnicodeObject *)intermediate
|
||||
, result.size() ? &result[0] : 0
|
||||
, result.size());
|
||||
if (!result.empty())
|
||||
{
|
||||
int err = PyUnicode_AsWideChar(
|
||||
(PyUnicodeObject *)intermediate
|
||||
, &result[0]
|
||||
, result.size());
|
||||
|
||||
if (err == -1)
|
||||
throw_error_already_set();
|
||||
if (err == -1)
|
||||
throw_error_already_set();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user