| 84 | using WCharStringPool = PoolT<wchar_t>; |
| 85 | |
| 86 | wchar_t* vtk_Py_UTF8ToWide(const char* arg) |
| 87 | { |
| 88 | wchar_t* result = nullptr; |
| 89 | if (arg != nullptr) |
| 90 | { |
| 91 | size_t length = vtksysEncoding_mbstowcs(nullptr, arg, 0); |
| 92 | if (length > 0) |
| 93 | { |
| 94 | result = (wchar_t*)PyMem_RawMalloc(sizeof(wchar_t) * (length + 1)); |
| 95 | vtksysEncoding_mbstowcs(result, arg, length + 1); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | return result; |
| 100 | } |
| 101 | |
| 102 | #if PY_VERSION_HEX < 0x03080000 |
| 103 | std::string vtk_Py_WideToUTF8(const wchar_t* arg) |
no outgoing calls
no test coverage detected